Skip to content

Commit bfaf874

Browse files
committed
Add Test project
1 parent 758986f commit bfaf874

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

rasp-test-meta/SampleTests.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using rasp_test.Data;
2+
3+
namespace rasp_test_meta
4+
{
5+
[TestClass]
6+
public class SampleTests
7+
{
8+
[TestMethod]
9+
public void GivenAAndBWhenAddedThenReturnsCorrectResult()
10+
{
11+
int a=10; int b=90;
12+
int c=90; int d=0;
13+
int e=21; int f=42;
14+
int g=156; int h=981;
15+
16+
Assert.AreEqual(100, OperationsService.AddPairAsync(a, b).Result);
17+
Assert.AreEqual(90, OperationsService.AddPairAsync(c, d).Result);
18+
Assert.AreEqual(63, OperationsService.AddPairAsync(e, f).Result);
19+
Assert.AreEqual(1137, OperationsService.AddPairAsync(g, h).Result);
20+
}
21+
}
22+
}

rasp-test-meta/Usings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
global using Microsoft.VisualStudio.TestTools.UnitTesting;

rasp-test-meta/rasp-test-meta.csproj

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net7.0</TargetFramework>
5+
<RootNamespace>rasp_test_meta</RootNamespace>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
9+
<IsPackable>false</IsPackable>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
14+
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
15+
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
16+
<PackageReference Include="coverlet.collector" Version="3.1.2" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<ProjectReference Include="..\rasp-test\rasp-test.csproj" />
21+
</ItemGroup>
22+
23+
</Project>

rasp-test.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ VisualStudioVersion = 17.4.33403.182
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "rasp-test", "rasp-test\rasp-test.csproj", "{F27DE959-E6F5-4A9D-B51B-3014D7953A30}"
77
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "rasp-test-meta", "rasp-test-meta\rasp-test-meta.csproj", "{0CCFE1E6-C4AD-465B-A1F9-407FD01067D9}"
9+
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
1517
{F27DE959-E6F5-4A9D-B51B-3014D7953A30}.Debug|Any CPU.Build.0 = Debug|Any CPU
1618
{F27DE959-E6F5-4A9D-B51B-3014D7953A30}.Release|Any CPU.ActiveCfg = Release|Any CPU
1719
{F27DE959-E6F5-4A9D-B51B-3014D7953A30}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{0CCFE1E6-C4AD-465B-A1F9-407FD01067D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{0CCFE1E6-C4AD-465B-A1F9-407FD01067D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{0CCFE1E6-C4AD-465B-A1F9-407FD01067D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{0CCFE1E6-C4AD-465B-A1F9-407FD01067D9}.Release|Any CPU.Build.0 = Release|Any CPU
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)