Exemple #1
0
 public void Parse_Unknown_AreEqual()
 {
     using (new CultureInfoScope("en-GB"))
     {
         var act = YesNo.Parse("?");
         var exp = YesNo.Unknown;
         Assert.AreEqual(exp, act);
     }
 }
Exemple #2
0
 public void Parse_InvalidInput_ThrowsFormatException()
 {
     using (new CultureInfoScope("en-GB"))
     {
         Assert.Catch <FormatException>
             (() =>
         {
             YesNo.Parse("InvalidInput");
         },
             "Not a valid Yes-no");
     }
 }
Exemple #3
0
        public void IsNo(bool expected, string str)
        {
            var yesNo = YesNo.Parse(str);

            Assert.AreEqual(expected, yesNo.IsNo());
        }