Beispiel #1
0
 public void ConvertError(string input, HexFormatting formatting, string expectedError)
 {
     Assert.That(() => HexEncodingExtensions.FromHexString(input, formatting),
                 Throws.Exception
                 .InstanceOf <ArgumentException>()
                 .With.Message.EqualTo(expectedError));
 }
Beispiel #2
0
        public void Convert(string input, HexFormatting formatting, string expected)
        {
            var bytes  = HexEncodingExtensions.FromHexString(input, formatting);
            var actual = HexEncodingExtensions.ToHexString(bytes, formatting);

            Assert.AreEqual(expected, actual);
        }