Add project files.

This commit is contained in:
Martin Murzsicz
2022-06-07 18:58:44 +02:00
parent 42c86cd8a8
commit a6a6d40011
5 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</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="..\Bankos\Bankos.csproj" />
</ItemGroup>
</Project>

22
TestProject1/UnitTest1.cs Normal file
View File

@@ -0,0 +1,22 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Bankos;
namespace BankTest
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
int kezdegyenleg = 1000;
int csokkento = 300;
int elvart = 700;
BankAdat ba = new BankAdat("Kiss P<>ter", kezdegyenleg);
ba.Kivet(csokkento);
int eredmeny = ba.getEgyenleg();
Assert.AreEqual(elvart, eredmeny);
}
}
}