Cosmos/Tests/Cosmos.TestRunner.TestController/Assert.cs
2015-06-21 15:25:21 +02:00

24 lines
679 B
C#

using System;
namespace Cosmos.TestRunner
{
public static class Assert
{
public static void IsTrue(bool condition, string message)
{
if (condition)
{
TestController.Debugger.Send("Assertion succeeded:");
TestController.Debugger.Send(message);
TestController.AssertionSucceeded();
}
else
{
TestController.Debugger.Send("Assertion failed!:");
TestController.Debugger.Send(message);
TestController.Failed();
throw new Exception("Assertion failed!");
}
}
}
}