Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/net-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _ReSharper.*
bin
obj
.vs
Tests/Configuration*.json
Configuration.json
*.DotSettings
*.binlog
snippets_test/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:]]*$$__' {} \;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net480;net481</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsTestProject>true</IsTestProject>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="TestResults\**" />
<EmbeddedResource Remove="TestResults\**" />
<None Remove="TestResults\**" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Tests\ApiExceptionTests.cs" Link="ApiExceptionTests.cs" />
<Compile Include="..\Tests\ConfigurationTests.cs" Link="ConfigurationTests.cs" />
<Compile Include="..\Tests\GenerateAndThenRecognize.cs" Link="GenerateAndThenRecognize.cs" />
<Compile Include="..\Tests\GenerateTests.cs" Link="GenerateTests.cs" />
<Compile Include="..\Tests\JwtAuthTests.cs" Link="JwtAuthTests.cs" />
<Compile Include="..\Tests\RecognizeTests.cs" Link="RecognizeTests.cs" />
<Compile Include="..\Tests\ScanTests.cs" Link="ScanTests.cs" />
<Compile Include="..\Tests\TestsBase.cs" Link="TestsBase.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Aspose.BarCode-Cloud" Version="25.11.0" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions NetFrameworkTests/Configuration.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"ClientId": "Client Id from https://dashboard.aspose.cloud/applications",
"ClientSecret": "Client Secret from https://dashboard.aspose.cloud/applications"
}
16 changes: 16 additions & 0 deletions NetFrameworkTests/nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<configuration>

<packageSources>
<add key="local" value="." />
</packageSources>

<packageSourceMapping>
<packageSource key="local">
<package pattern="Aspose.BarCode-Cloud" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>

</configuration>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions Tests/Aspose.BarCode.Cloud.Sdk.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net480;net481;net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>NU1510</WarningsNotAsErrors>
<IsTestProject>true</IsTestProject>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="TestResults\**"/>
Expand All @@ -17,7 +15,6 @@
<PackageReference Include="NUnit" Version="3.14.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0"/>
<PackageReference Include="System.Net.Http" Version="4.3.4"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\Aspose.BarCode.Cloud.Sdk.csproj"/>
Expand Down
4 changes: 1 addition & 3 deletions Tests/Configuration.template.json
Original file line number Diff line number Diff line change
@@ -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"
}
Loading