Add project files.

This commit is contained in:
2019-11-18 16:59:38 +01:00
parent 5ec0c4fa3e
commit eef116b5f6
22 changed files with 841 additions and 0 deletions

36
TestingLib/Assert.cs Normal file
View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
using System.Text;
namespace TestingLib
{
public class Assert
{
public static ObservableCollection<UnitTestInfo> TestResults { get; set; }
static Assert()
{
TestResults = new ObservableCollection<UnitTestInfo>();
}
public static void AreEqual(object first,
object second,
string message,
[CallerMemberName] string methodName = null)
{
var testInfo = new UnitTestInfo();
if (first.Equals(second))
{
testInfo.DidTestPass = true;
}
else
{
testInfo.DidTestPass = false;
testInfo.TestFailureMessage = message;
}
testInfo.MethodName = methodName;
TestResults.Add(testInfo);
}
}
}