From 0c5af9f73d12f22ddcce93951207ac005f27d3c2 Mon Sep 17 00:00:00 2001 From: Ronan Burke Date: Fri, 13 Oct 2023 22:02:50 +0100 Subject: [PATCH] Unit test actions --- .github/workflows/ci-demo-app.yml | 4 +++- .github/workflows/ci.yml | 6 ++++-- .../Models/NavigationParametersTests.cs | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-demo-app.yml b/.github/workflows/ci-demo-app.yml index 6b68151..1122b93 100644 --- a/.github/workflows/ci-demo-app.yml +++ b/.github/workflows/ci-demo-app.yml @@ -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 \ No newline at end of file + run: dotnet build samples\DemoApp\DemoApp.sln -c Release + - name: Run Unit Tests + run: dotnet test tests\DemoApp.UnitTests\DemoApp.UnitTests.csproj --verbosity normal \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c2cef5..0b14602 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Build for CI +name: Build Library for CI on: push: @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/tests/Burkus.Mvvm.Maui.UnitTests/Models/NavigationParametersTests.cs b/tests/Burkus.Mvvm.Maui.UnitTests/Models/NavigationParametersTests.cs index 1e5546c..c06e7d0 100644 --- a/tests/Burkus.Mvvm.Maui.UnitTests/Models/NavigationParametersTests.cs +++ b/tests/Burkus.Mvvm.Maui.UnitTests/Models/NavigationParametersTests.cs @@ -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¶m2=123¶m3=True¶m4=12%2f12%2f1994+00%3a00%3a00", result); + Assert.Equal("?param1=value1¶m2=123¶m3=True", result); } } \ No newline at end of file