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