Add project files.
This commit is contained in:
20
BankTest/BankTest.csproj
Normal file
20
BankTest/BankTest.csproj
Normal 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
25
BankTest/UnitTest1.cs
Normal 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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user