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