diff --git a/.github/workflows/net-framework.yml b/.github/workflows/net-framework.yml index 4c75c05..580c863 100644 --- a/.github/workflows/net-framework.yml +++ b/.github/workflows/net-framework.yml @@ -39,14 +39,19 @@ jobs: - name: Setup VSTest uses: darenm/Setup-VSTest@v1.2 - - name: Build the Solution - run: msbuild -restore -p:Configuration=Release + - name: Pack nuget + run: | + msbuild -restore -t:clean,rebuild,pack -p:Configuration=Release + copy src\bin\Release\*.nupkg NetFrameworkTests + + - name: Build test project + run: msbuild NetFrameworkTests\Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.csproj -restore -p:Configuration=Release - name: Test with VSTest run: | $ErrorActionPreference = "Stop" - VSTest.Console.exe /Framework:".NETFramework,Version=${{ matrix.net-version }}" /ResultsDirectory:Tests\Results /Logger:"trx;LogFileName=test.log" Tests\bin\Release\${{ matrix.framework }}\Aspose.BarCode.Cloud.Sdk.Tests.dll - if( ([xml](Get-Content Tests\Results\test.log)).TestRun.ResultSummary.Counters.total -ne 25 ){ throw "Not all tests were explored or added new tests" } + VSTest.Console.exe /Framework:".NETFramework,Version=${{ matrix.net-version }}" /ResultsDirectory:NetFrameworkTests\Results /Logger:"trx;LogFileName=test.log" NetFrameworkTests\bin\Release\${{ matrix.framework }}\Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.dll + if( ([xml](Get-Content NetFrameworkTests\Results\test.log)).TestRun.ResultSummary.Counters.total -ne 21 ){ throw "Not all tests were explored or added new tests" } env: TEST_CONFIGURATION_JWT_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }} diff --git a/.gitignore b/.gitignore index 71d9dce..879a55d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ _ReSharper.* bin obj .vs -Tests/Configuration*.json +Configuration.json *.DotSettings *.binlog snippets_test/ diff --git a/Makefile b/Makefile index a63ada9..bf87c4f 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ init: format: dotnet restore ./Aspose.BarCode.Cloud.Sdk.sln dotnet format ./Aspose.BarCode.Cloud.Sdk.sln --no-restore - dotnet format --include ./snippets/ + dotnet format --include ./snippets/ --include ./NetFrameworkTests/ # Trim white space in comments find . -iname "*.cs" -exec sed -i -e 's_[[:space:]]*$$__' {} \; diff --git a/NetFrameworkTests/Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.csproj b/NetFrameworkTests/Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.csproj new file mode 100644 index 0000000..7808e8b --- /dev/null +++ b/NetFrameworkTests/Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.csproj @@ -0,0 +1,34 @@ + + + + net462;net480;net481 + true + true + 8.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NetFrameworkTests/Configuration.template.json b/NetFrameworkTests/Configuration.template.json new file mode 100644 index 0000000..fb5ee04 --- /dev/null +++ b/NetFrameworkTests/Configuration.template.json @@ -0,0 +1,4 @@ +{ + "ClientId": "Client Id from https://dashboard.aspose.cloud/applications", + "ClientSecret": "Client Secret from https://dashboard.aspose.cloud/applications" +} diff --git a/NetFrameworkTests/nuget.config b/NetFrameworkTests/nuget.config new file mode 100644 index 0000000..048733c --- /dev/null +++ b/NetFrameworkTests/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/NetFrameworkTests/test_data/Test_PostGenerateMultiple.png b/NetFrameworkTests/test_data/Test_PostGenerateMultiple.png new file mode 100644 index 0000000..46b0fc5 Binary files /dev/null and b/NetFrameworkTests/test_data/Test_PostGenerateMultiple.png differ diff --git a/Tests/Aspose.BarCode.Cloud.Sdk.Tests.csproj b/Tests/Aspose.BarCode.Cloud.Sdk.Tests.csproj index 671baca..316ef8d 100644 --- a/Tests/Aspose.BarCode.Cloud.Sdk.Tests.csproj +++ b/Tests/Aspose.BarCode.Cloud.Sdk.Tests.csproj @@ -1,11 +1,9 @@ - net462;net480;net481;net8.0;net9.0;net10.0 + net8.0;net9.0;net10.0 true - NU1510 true - 8.0 @@ -17,7 +15,6 @@ - diff --git a/Tests/Configuration.template.json b/Tests/Configuration.template.json index 7c22e70..fb5ee04 100644 --- a/Tests/Configuration.template.json +++ b/Tests/Configuration.template.json @@ -1,6 +1,4 @@ { "ClientId": "Client Id from https://dashboard.aspose.cloud/applications", - "ClientSecret": "Client Secret from https://dashboard.aspose.cloud/applications", - "ApiBaseUrl": "https://api.aspose.cloud", - "TokenUrl": "https://api.aspose.cloud/connect/token" + "ClientSecret": "Client Secret from https://dashboard.aspose.cloud/applications" }