public void Parse_NoValues() { string[] words = new string[] { "n", "no", "N", "NO", "No", "-" }; foreach (string word in words) { Assert.AreEqual(false, Bool.ParseYesNo(word)); } }
public void Parse_YesValues() { string[] words = new string[] { "y", "yes", "Y", "YES", "Yes" }; foreach (string word in words) { Assert.AreEqual(true, Bool.ParseYesNo(word)); } }
//--------------------------------------------------------------------- private bool Parse_PrintException(string word) { try { return(Bool.ParseYesNo(word)); } catch (System.Exception exc) { Data.Output.WriteLine(exc.Message); throw; } }