public void UppercaseHexLettersAreBad() { for (var loop = 0; loop < 6; loop++) { var hex = (char)('A' + loop); Assert.Throws <BadParseException>(() => HexHelp.HexValue(hex)); } }
public void ConvertsDigits() { for (var loop = 0; loop < 10; loop++) { var hex = (char)('0' + loop); var value = HexHelp.HexValue(hex); Assert.Equal(loop, value); } }
public void ConvertsLowercaseHexLetters() { for (var loop = 0; loop < 6; loop++) { var hex = (char)('a' + loop); var value = HexHelp.HexValue(hex); Assert.Equal(10 + loop, value); } }