public void ConvertCharToByte_ShouldThrowArgumentOutOfRangeException_WhenInputIsNotValid(char c, bool throwsException) { if (throwsException) { Assert.Throws <ArgumentOutOfRangeException>(() => HexEncoding.ConvertCharToByte(c)); } else { Assert.IsType <byte>(HexEncoding.ConvertCharToByte(c)); } }