public void Parse_OutOfRange() { Assert.Throws <FormatException>(() => FourBitNumber.Parse("200")); Assert.Throws <FormatException>(() => FourBitNumber.Parse("16")); }
public void Parse() { Assert.AreEqual((FourBitNumber)12, FourBitNumber.Parse("12")); Assert.AreEqual((FourBitNumber)0, FourBitNumber.Parse("0")); Assert.AreEqual((FourBitNumber)15, FourBitNumber.Parse("15")); }
public void Parse_InvalidFormat() { Assert.Throws <FormatException>(() => FourBitNumber.Parse("sdsd")); }