Commit 08f2b33e authored by jan.ripken's avatar jan.ripken
Browse files

Updated tests

parent 76078dc7
......@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31129.286
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MergeSort_Array", "MergeSort_Array\MergeSort_Array.csproj", "{EB899758-0297-48E4-8444-C86C60F9C050}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MergeSort_Array", "MergeSort_Array\MergeSort_Array.csproj", "{EB899758-0297-48E4-8444-C86C60F9C050}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MergeSort_Array.UnitTest", "MergeSort_Array.UnitTest\MergeSort_Array.UnitTest.csproj", "{BBA13512-D4DB-4A86-9DE7-E7B6567EDF7A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MergeSort_Array_test", "MergeSort_Array_test\MergeSort_Array_test.csproj", "{5799953D-B4C9-4F82-AD9E-E3278F9741AB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -17,10 +17,10 @@ Global
{EB899758-0297-48E4-8444-C86C60F9C050}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB899758-0297-48E4-8444-C86C60F9C050}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB899758-0297-48E4-8444-C86C60F9C050}.Release|Any CPU.Build.0 = Release|Any CPU
{BBA13512-D4DB-4A86-9DE7-E7B6567EDF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBA13512-D4DB-4A86-9DE7-E7B6567EDF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBA13512-D4DB-4A86-9DE7-E7B6567EDF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBA13512-D4DB-4A86-9DE7-E7B6567EDF7A}.Release|Any CPU.Build.0 = Release|Any CPU
{5799953D-B4C9-4F82-AD9E-E3278F9741AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5799953D-B4C9-4F82-AD9E-E3278F9741AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5799953D-B4C9-4F82-AD9E-E3278F9741AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5799953D-B4C9-4F82-AD9E-E3278F9741AB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
<PackageReference Include="coverlet.collector" Version="3.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MergeSort_Array\MergeSort_Array.csproj" />
</ItemGroup>
</Project>
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.Linq;
using MergeSort_Array;
namespace MergeSort_Array_test
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
// Arrange
Program prg = new Program();
//Act
var result = prg.MergeSort(new int[] { 12, 31, 68, 54 });
//Assert
Assert.IsTrue(Enumerable.SequenceEqual(new int[] { 12, 31, 54, 68 }, result));
}
[TestMethod]
public void TestMethod2()
{
// Arrange
Program prg = new Program();
//Act
var result = prg.MergeSort(new int[] { 12, 31, 68, 54, 13, 56, 43, 87, 3, 9, 59, 76 });
//Assert
Assert.IsTrue(Enumerable.SequenceEqual(new int[] { 3, 9, 12, 13, 31, 43, 54, 56, 59, 68, 76, 87 }, result));
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment