From c62e5bcf55289d176bfc1ceafe34cf5bd4a99ca7 Mon Sep 17 00:00:00 2001 From: rahelosm Date: Mon, 10 Feb 2025 16:19:50 +0200 Subject: [PATCH 1/3] Change frameworks. Fix Unit test. --- .github/workflows/BuildAndTestOnEveryPush.yml | 2 +- .github/workflows/PackAndPushAfterMerge.yml | 2 +- .../Frends.Community.PostFile.Tests.cs | 3 ++- .../Frends.Community.PostFile.Tests.csproj | 2 +- Frends.Community.PostFile/Frends.Community.PostFile.csproj | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/BuildAndTestOnEveryPush.yml b/.github/workflows/BuildAndTestOnEveryPush.yml index 97f62ca..229db22 100644 --- a/.github/workflows/BuildAndTestOnEveryPush.yml +++ b/.github/workflows/BuildAndTestOnEveryPush.yml @@ -23,4 +23,4 @@ jobs: run: dotnet pack --configuration Release --include-source - name: Push NuGet package to the testfeed - run: dotnet nuget push Frends.Community.PostFile\bin\Release\Frends.Community.PostFile.*.nupkg --api-key ${{ secrets.COMMUNITY_FEED_API_KEY }} --source https://www.myget.org/F/frends-community-test/api/v2/package --symbol-source https://www.myget.org/F/frends-community-test/symbols/api/v2/package + run: dotnet nuget push Frends.Community.PostFile\bin\Release\Frends.Community.PostFile.*.nupkg --api-key ${{ secrets.COMMUNITY_FEED_API_KEY }} --source https://www.myget.org/F/frends-community-test/api/v2/package diff --git a/.github/workflows/PackAndPushAfterMerge.yml b/.github/workflows/PackAndPushAfterMerge.yml index 21352e5..e581dbe 100644 --- a/.github/workflows/PackAndPushAfterMerge.yml +++ b/.github/workflows/PackAndPushAfterMerge.yml @@ -24,7 +24,7 @@ jobs: run: dotnet pack --configuration Release --include-source - name: Push NuGet package to the (prod) feed - run: dotnet nuget push Frends.Community.PostFile\bin\Release\Frends.Community.PostFile.*.nupkg --api-key ${{ secrets.COMMUNITY_FEED_API_KEY }} --source https://www.myget.org/F/frends-community/api/v2/package --symbol-source https://www.myget.org/F/frends-community/symbols/api/v2/package + run: dotnet nuget push Frends.Community.PostFile\bin\Release\Frends.Community.PostFile.*.nupkg --api-key ${{ secrets.COMMUNITY_FEED_API_KEY }} --source https://www.myget.org/F/frends-community/api/v2/package - name: Create Release id: create_release diff --git a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.cs b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.cs index 8739872..7e2019a 100644 --- a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.cs +++ b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.cs @@ -33,7 +33,7 @@ public async Task RequestShouldSetEncodingWithContentTypeCharsetIgnoringCase() _stubHttp.Stub(x => x.Post("/endpoint")) .AsContentType($"text/plain; charset={codePageName}") - .Return("foo ���") + .Return("foo ���") .OK(); var contentType = new Header { Name = "cONTENT-tYpE", Value = expectedContentType }; @@ -48,6 +48,7 @@ public async Task RequestShouldSetEncodingWithContentTypeCharsetIgnoringCase() //Casing should not affect setting header. Assert.That(requestContentType, Is.EqualTo(expectedContentType)); Assert.That(requestBodyByteArray, Is.EqualTo(utf8ByteArray)); + _stubHttp.Dispose(); } } } diff --git a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj index 9190c92..999c1a9 100644 --- a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj +++ b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj @@ -1,7 +1,7 @@  - net471 + netstandard2.0;net471;net6.0;net8.0 false diff --git a/Frends.Community.PostFile/Frends.Community.PostFile.csproj b/Frends.Community.PostFile/Frends.Community.PostFile.csproj index e0c957c..d992ede 100644 --- a/Frends.Community.PostFile/Frends.Community.PostFile.csproj +++ b/Frends.Community.PostFile/Frends.Community.PostFile.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net471 + netstandard2.0;net471;net6.0;net8.0 HiQ Finland HiQ Finland MIT @@ -9,7 +9,7 @@ true Frends true - 1.0.1 + 1.0.2 From cdca15e7aaaaddebc3393e37596cff736829840c Mon Sep 17 00:00:00 2001 From: rahelosm Date: Mon, 24 Feb 2025 09:49:30 +0200 Subject: [PATCH 2/3] Test only with framework and net8.0 --- .../Frends.Community.PostFile.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj index 999c1a9..f8473e9 100644 --- a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj +++ b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net471;net6.0;net8.0 + netstandard2.0;net471;net8.0 false From 09a7c009e2d49b996f0e0ea4f0e8e6c80996a1bc Mon Sep 17 00:00:00 2001 From: rahelosm Date: Mon, 24 Feb 2025 09:56:17 +0200 Subject: [PATCH 3/3] Remove framework test --- .../Frends.Community.PostFile.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj index f8473e9..6434308 100644 --- a/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj +++ b/Frends.Community.PostFile.Tests/Frends.Community.PostFile.Tests.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net471;net8.0 + netstandard2.0;net8.0 false