Ejemplo n.º 1
0
 public void Parse_NoValues()
 {
     string[] words = new string[] { "n", "no", "N", "NO", "No", "-" };
     foreach (string word in words)
     {
         Assert.AreEqual(false, Bool.ParseYesNo(word));
     }
 }
Ejemplo n.º 2
0
 public void Parse_YesValues()
 {
     string[] words = new string[] { "y", "yes", "Y", "YES", "Yes" };
     foreach (string word in words)
     {
         Assert.AreEqual(true, Bool.ParseYesNo(word));
     }
 }
Ejemplo n.º 3
0
        //---------------------------------------------------------------------

        private bool Parse_PrintException(string word)
        {
            try {
                return(Bool.ParseYesNo(word));
            }
            catch (System.Exception exc) {
                Data.Output.WriteLine(exc.Message);
                throw;
            }
        }