public static string ToStrings(this bool @this, BooleanToString val = BooleanToString.Default) { if (@this) { switch (val) { case BooleanToString.True_False: return("True"); case BooleanToString.T_F: return("T"); case BooleanToString.Yse_No: return("Yes"); case BooleanToString.Y_N: return("Y"); case BooleanToString.Int_1_0: return("1"); case BooleanToString.Int_11_00: return("11"); default: return("1"); } } else { switch (val) { case BooleanToString.True_False: return("False"); case BooleanToString.T_F: return("F"); case BooleanToString.Yse_No: return("No"); case BooleanToString.Y_N: return("N"); case BooleanToString.Int_1_0: return("0"); case BooleanToString.Int_11_00: return("00"); default: return("0"); } } }
public static int Main() { BooleanToString testCase = new BooleanToString(); TestLibrary.TestFramework.BeginTestCase("Boolean.ToString"); if (testCase.RunTests()) { TestLibrary.TestFramework.EndTestCase(); TestLibrary.TestFramework.LogInformation("PASS"); return(100); } else { TestLibrary.TestFramework.EndTestCase(); TestLibrary.TestFramework.LogInformation("FAIL"); return(0); } }
public static int Main() { BooleanToString testCase = new BooleanToString(); TestLibrary.TestFramework.BeginTestCase("Boolean.ToString"); if (testCase.RunTests()) { TestLibrary.TestFramework.EndTestCase(); TestLibrary.TestFramework.LogInformation("PASS"); return 100; } else { TestLibrary.TestFramework.EndTestCase(); TestLibrary.TestFramework.LogInformation("FAIL"); return 0; } }
public static void Main() { BooleanToString instance = new BooleanToString(); instance.Converter(true); }