Egységteszt hozzáadása.
This commit is contained in:
parent
f3d40ef94e
commit
6ccb44e812
20
MerkozesTest/MerkozesTest.csproj
Normal file
20
MerkozesTest/MerkozesTest.csproj
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<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="NUnit" Version="3.13.1" />
|
||||||
|
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
|
||||||
|
<PackageReference Include="coverlet.collector" Version="3.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Merkozesek\Merkozesek.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
20
MerkozesTest/UnitTest1.cs
Normal file
20
MerkozesTest/UnitTest1.cs
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace MerkozesTest
|
||||||
|
{
|
||||||
|
public class Tests
|
||||||
|
{
|
||||||
|
Merkozesek.Merkozes merk;
|
||||||
|
[SetUp]
|
||||||
|
public void Setup()
|
||||||
|
{
|
||||||
|
merk = new Merkozesek.Merkozes("2 3 2 2 1 elsocsapat masodikcsapat");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test1()
|
||||||
|
{
|
||||||
|
Assert.AreEqual("masodikcsapat",merk.Vendeg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.32802.440
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merkozesek", "Merkozesek\Merkozesek.csproj", "{966D2934-E2EA-4546-8738-5B9320FB97E3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merkozesek", "Merkozesek\Merkozesek.csproj", "{966D2934-E2EA-4546-8738-5B9320FB97E3}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MerkozesTest", "MerkozesTest\MerkozesTest.csproj", "{3FF5D236-EB21-4533-83C5-8099D1E0BF35}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -15,6 +17,10 @@ Global
|
||||||
{966D2934-E2EA-4546-8738-5B9320FB97E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{966D2934-E2EA-4546-8738-5B9320FB97E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{966D2934-E2EA-4546-8738-5B9320FB97E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{966D2934-E2EA-4546-8738-5B9320FB97E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{966D2934-E2EA-4546-8738-5B9320FB97E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
{966D2934-E2EA-4546-8738-5B9320FB97E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3FF5D236-EB21-4533-83C5-8099D1E0BF35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3FF5D236-EB21-4533-83C5-8099D1E0BF35}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3FF5D236-EB21-4533-83C5-8099D1E0BF35}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3FF5D236-EB21-4533-83C5-8099D1E0BF35}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Merkozesek
|
||||||
HazaiRugottFelido = int.Parse(t[3]);
|
HazaiRugottFelido = int.Parse(t[3]);
|
||||||
VendegRugottFelido = int.Parse(t[4]);
|
VendegRugottFelido = int.Parse(t[4]);
|
||||||
Hazai = t[5];
|
Hazai = t[5];
|
||||||
Vendeg = t[6];
|
Vendeg = t[5];
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user