Cosmos/source/FrodeTest/Check.cs
Scalpel_cp ad01f4868f Fixed String.LastIndexOf bug
Almost all of System.IO.Plug works now.
2008-09-07 11:10:02 +00:00

42 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FrodeTest
{
public static class Check
{
private static string mText = "";
public static string Text { get { return mText; } set { mText = value; } }
public static void Validate(bool expression)
{
if (expression)
OK();
else
Fail();
}
public static void OK()
{
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("OK [" + Text + "]");
Console.ForegroundColor = ConsoleColor.White;
}
public static void Fail()
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("FAIL [" + Text + "]");
Console.ForegroundColor = ConsoleColor.White;
}
internal static void SetHeadingText(string heading)
{
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine("-- " + heading + " --");
Console.ForegroundColor = ConsoleColor.White;
}
}
}