added unit tests
This commit is contained in:
46
20250221/UnitTests/UnitTestsTests/Feladat2Tests.cs
Normal file
46
20250221/UnitTests/UnitTestsTests/Feladat2Tests.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using UnitTests;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UnitTests.Tests
|
||||
{
|
||||
[TestClass()]
|
||||
public class Feladat2Tests
|
||||
{
|
||||
Feladat2 feladat2 = new Feladat2();
|
||||
|
||||
[TestMethod()]
|
||||
public void ConcatTest()
|
||||
{
|
||||
Assert.AreEqual(feladat2.Concat("a", "b"), ("a" + "b"));
|
||||
}
|
||||
|
||||
[TestMethod()]
|
||||
public void GetLengthTest()
|
||||
{
|
||||
Assert.AreEqual(3, feladat2.GetLength("asd"));
|
||||
}
|
||||
|
||||
[TestMethod()]
|
||||
public void GetNullStringTest()
|
||||
{
|
||||
Assert.IsNull(feladat2.GetNullString());
|
||||
}
|
||||
|
||||
[TestMethod()]
|
||||
public void GetStringInstanceTest()
|
||||
{
|
||||
Assert.AreEqual("", feladat2.GetStringInstance());
|
||||
}
|
||||
|
||||
[TestMethod()]
|
||||
public void IsEmptyTest()
|
||||
{
|
||||
Assert.IsTrue(feladat2.IsEmpty(""));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user