Skip to content

Commit

Permalink
Merge pull request #27 from Mastercard/use-net5
Browse files Browse the repository at this point in the history
Moving to the netstandard2.1 

Building tests using .Net5
  • Loading branch information
karen-avetisyan-mc authored Feb 28, 2024
2 parents b03b86f + 8eb9739 commit 531d7d9
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ jobs:
strategy:
matrix:
dotnet:
- 8.0.201
- 5.0.x
include:
- dotnet: 8.0.201
- dotnet: 5.0.x
mono: none
TEST_PROJECT: $NETCORE_TEST_PROJECT
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET 8
- name: Setup .NET 5
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: 8.0.201
- name: Build using .NET 8
dotnet-version: 5.0.x
- name: Build using .NET 5
run: >
export PATH="$PATH:$HOME/.dotnet/tools"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net5</TargetFramework>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DE07F478-E087-4FAA-80E2-220671C70418}</ProjectGuid>
Expand Down Expand Up @@ -140,4 +140,4 @@
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="coverlet.collector" Version="6.0.1" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DE07F478-E087-4FAA-80E2-220671C70418}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mastercard.Developer.ClientEncryption.Tests.Net4x</RootNamespace>
<AssemblyName>Mastercard.Developer.ClientEncryption.Tests.Net4x</AssemblyName>
<TargetFrameworkVersion>v6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>../../Identity.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Tests\Encryption\AES\AesEncryptionTest.cs">
<Link>Encryption\AES\AesEncryptionTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\EncryptionExceptionTest.cs">
<Link>Encryption\EncryptionExceptionTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\FieldLevelEncryptionConfigBuilderTest.cs">
<Link>Encryption\FieldLevelEncryptionConfigBuilderTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\FieldLevelEncryptionParamsTest.cs">
<Link>Encryption\FieldLevelEncryptionParamsTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\FieldLevelEncryptionTest.cs">
<Link>Encryption\FieldLevelEncryptionTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\JweConfigBuilderTest.cs">
<Link>Encryption\JweConfigBuilderTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\JWE\JweEncryptionTest.cs">
<Link>Encryption\JWE\JweEncryptionTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Interceptors\RestResponseDouble.cs">
<Link>Interceptors\RestResponseDouble.cs</Link>
</Compile>
<Compile Include="..\Tests\Interceptors\RestSharpFieldLevelEncryptionInterceptorTest.cs">
<Link>Interceptors\RestSharpFieldLevelEncryptionInterceptorTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Interceptors\RestSharpV2FieldLevelEncryptionInterceptorTest.cs">
<Link>Interceptors\RestSharpV2FieldLevelEncryptionInterceptorTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Interceptors\RestSharpV2CbcJweEncryptionInterceptorTest.cs">
<Link>Interceptors\RestSharpV2CbcJweEncryptionInterceptorTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Interceptors\RestSharpV2GcmJweEncryptionInterceptorTest.cs">
<Link>Interceptors\RestSharpV2GcmJweEncryptionInterceptorTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\JWE\GcmJweObjectTest.cs">
<Link>Encryption\JWE\GcmJweObjectTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\JWE\JweHeaderTest.cs">
<Link>Encryption\JWE\JweHeaderTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\JWE\CbcJweObjectTest.cs">
<Link>Encryption\JWE\CbcJweObjectTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Encryption\RSA\RsaEncryptionTest.cs">
<Link>Encryption\RSA\RsaEncryptionTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Test\TestUtils.cs">
<Link>Test\TestUtils.cs</Link>
</Compile>
<Compile Include="..\Tests\Utils\Base64UtilsTest.cs">
<Link>Utils\Base64UtilsTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Utils\ByteUtilsTest.cs">
<Link>Utils\ByteUtilsTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Utils\EncodingUtilsTest.cs">
<Link>Utils\EncodingUtilsTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Utils\EncryptionUtilsTest.cs">
<Link>Utils\EncryptionUtilsTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Utils\JsonUtilsTest.cs">
<Link>Utils\JsonUtilsTest.cs</Link>
</Compile>
<Compile Include="..\Tests\Utils\RsaKeyUtilsTest.cs">
<Link>Utils\RsaKeyUtilsTest.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\Tests\_Resources\Certificates\test_certificate-1024.pem">
<Link>_Resources\Certificates\test_certificate-1024.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Certificates\test_certificate-2048.der">
<Link>_Resources\Certificates\test_certificate-2048.der</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Certificates\test_certificate-2048.pem">
<Link>_Resources\Certificates\test_certificate-2048.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Certificates\test_certificate-4096.pem">
<Link>_Resources\Certificates\test_certificate-4096.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Certificates\test_certificate-512.pem">
<Link>_Resources\Certificates\test_certificate-512.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs1\test_key_pkcs1-1024.pem">
<Link>_Resources\Keys\Pkcs1\test_key_pkcs1-1024.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs1\test_key_pkcs1-2048.pem">
<Link>_Resources\Keys\Pkcs1\test_key_pkcs1-2048.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs1\test_key_pkcs1-4096.pem">
<Link>_Resources\Keys\Pkcs1\test_key_pkcs1-4096.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs1\test_key_pkcs1-512.pem">
<Link>_Resources\Keys\Pkcs1\test_key_pkcs1-512.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs12\test_key.p12">
<Link>_Resources\Keys\Pkcs12\test_key.p12</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_invalid_key.der">
<Link>_Resources\Keys\Pkcs8\test_invalid_key.der</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-1024.der">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-1024.der</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-1024.pem">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-1024.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-2048.der">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-2048.der</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-2048.pem">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-2048.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-4096.der">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-4096.der</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-4096.pem">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-4096.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-512.der">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-512.der</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Tests\_Resources\Keys\Pkcs8\test_key_pkcs8-512.pem">
<Link>_Resources\Keys\Pkcs8\test_key_pkcs8-512.pem</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Mastercard.Developer.ClientEncryption.Core\Mastercard.Developer.ClientEncryption.Core.csproj">
<Project>{8ffa4f79-9d2c-4807-bad7-8e2f0a15e099}</Project>
<Name>Mastercard.Developer.ClientEncryption.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\Mastercard.Developer.ClientEncryption.RestSharpV2\Mastercard.Developer.ClientEncryption.RestSharpV2.csproj">
<Project>{bc6f2c72-16a3-44cb-ad68-3acd8a465640}</Project>
<Name>Mastercard.Developer.ClientEncryption.RestSharpV2</Name>
</ProjectReference>
<ProjectReference Include="..\..\Mastercard.Developer.ClientEncryption.RestSharp\Mastercard.Developer.ClientEncryption.RestSharp.csproj">
<Project>{4abdad88-8dc4-4463-91ec-74a711d6acfb}</Project>
<Name>Mastercard.Developer.ClientEncryption.RestSharp</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FubarCoder.RestSharp.Portable.Core">
<Version>4.0.6</Version>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter">
<Version>2.1.2</Version>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<Version>2.1.2</Version>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.Cng">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Security.Cryptography.X509Certificates">
<Version>4.3.2</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

0 comments on commit 531d7d9

Please sign in to comment.