public void Convert_Normal_AcceptsVariousArrayLengths()
        {
            IValueConverter converter = new BytesToHexConverter();
            byte[] input = new byte[] { 2 };
            string expected = "0x02";
            object output = converter.Convert(input, typeof(string), null, Thread.CurrentThread.CurrentCulture);

            Assert.AreEqual(expected, output, string.Format("Expected result is '{0}'", expected));

            input = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32, 64, 128, 255 };
            expected = "0x0102030405060708090A0B0C0D0E0F10204080FF";
            output = converter.Convert(input, typeof(string), null, Thread.CurrentThread.CurrentCulture);

            Assert.AreEqual(expected, output, string.Format("Expected result is '{0}'", expected));
        }
        public void Convert_Erroneous_InvalidTargetTypeThrowsArgumentException()
        {
            IValueConverter converter = new BytesToHexConverter();
            object input = "0x";
            object output = converter.Convert(input, typeof(DateTime), null, Thread.CurrentThread.CurrentCulture);

        }
        public void Convert_Boundary_EmptyInputReturns0x()
        {
            IValueConverter converter = new BytesToHexConverter();
            byte[] input = new byte[] { };
            object expected = "0x";
            object output = converter.Convert(input, typeof(string), null, Thread.CurrentThread.CurrentCulture);

            Assert.AreEqual(expected, output, string.Format("Expected result is '{0}'", expected));
        }
        public void Convert_Normal_StringCorrectFormat()
        {
            IValueConverter converter = new BytesToHexConverter();
            byte[] input = new byte[] { 2, 4, 8, 16, 32, 64, 128, 255 };
            string expected = "0x02040810204080FF";
            object output = converter.Convert(input, typeof(string), null, Thread.CurrentThread.CurrentCulture);

            Assert.AreEqual(expected, output, string.Format("Expected result is '{0}'", expected));
        }
 public void Convert_Erroneous_InvalidValueTypeThrowsArgumentException()
 {
     IValueConverter converter = new BytesToHexConverter();
     object input = "Some string";
     object output = converter.Convert(input, typeof(string), null, Thread.CurrentThread.CurrentCulture);
 }