Add project files.

This commit is contained in:
Csaba Fölker
2022-06-07 19:23:34 +02:00
parent cb44fd97c2
commit 736c6e9646
5 changed files with 126 additions and 0 deletions

20
BankTest/BankTest.csproj Normal file
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.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bankos\Bankos.csproj" />
</ItemGroup>
</Project>

25
BankTest/UnitTest1.cs Normal file
View File

@@ -0,0 +1,25 @@
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);
}
}
}