Ejemplo n.º 1
0
        public void ByteArrayToDottedDecimalStringTest()
        {
            var testArray = new byte[] { 0xb8, 0x27, 0xeb, 0x97, 0xb6, 0x39 };

            var result = testArray.ToDottedDecimalString();

            Assert.AreEqual("184.39.235.151.182.57", result, "Dotted Decimal representation not as expected");

            Assert.Throws <ArgumentNullException>(() =>
            {
                ByteExtensions.ToDottedDecimalString(null);
            }, "Not seen ArgumentNullException even though null has been passed for input");
        }