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

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