Skip to content

Commit

Permalink
Unit test actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BurkusCat committed Oct 13, 2023
1 parent 123a65d commit 0c5af9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci-demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ jobs:
- name: Restore dependencies
run: dotnet restore samples\DemoApp\DemoApp.sln
- name: Build
run: dotnet build samples\DemoApp\DemoApp.sln -c Release
run: dotnet build samples\DemoApp\DemoApp.sln -c Release
- name: Run Unit Tests
run: dotnet test tests\DemoApp.UnitTests\DemoApp.UnitTests.csproj --verbosity normal
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build for CI
name: Build Library for CI

on:
push:
Expand All @@ -24,4 +24,6 @@ jobs:
- name: Restore dependencies
run: dotnet restore src\Burkus.Mvvm.Maui.sln
- name: Build
run: dotnet build src\Burkus.Mvvm.Maui.sln -c Release
run: dotnet build src\Burkus.Mvvm.Maui.sln -c Release
- name: Run Unit Tests
run: dotnet test tests\Burkus.Mvvm.Maui.UnitTests\Burkus.Mvvm.Maui.UnitTests.csproj --verbosity normal
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,12 @@ public void ToQueryString_ForMultipleParameters_CreatesValidQueryString()
{ "param1", "value1" },
{ "param2", 123 },
{ "param3", true },
{ "param4", new DateTime(1994, 12, 12, 0, 0, 0, DateTimeKind.Utc) },
};

// Act
var result = navigationParameters.ToQueryString();

// Assert
Assert.Equal("?param1=value1&param2=123&param3=True&param4=12%2f12%2f1994+00%3a00%3a00", result);
Assert.Equal("?param1=value1&param2=123&param3=True", result);
}
}

0 comments on commit 0c5af9f

Please sign in to comment.