mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
24 lines
679 B
C#
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!");
|
|
}
|
|
}
|
|
}
|
|
}
|