public void GetAsLinkLocal_MacAddressUnExpectedLenth(Int32 length) { Random random = new Random(); Byte[] input = random.NextBytes(length); Assert.ThrowsAny <ArgumentOutOfRangeException>(() => IPv6Address.GetAsLinkLocal(input)); }
public void GetAsLinkLocal(String macAddressInput, String expectedLinkLocalAddress) { Byte[] input = ByteHelper.GetBytesFromHexString(macAddressInput.Replace(":", String.Empty)); var actual = IPv6Address.GetAsLinkLocal(input); var expected = IPv6Address.FromString(expectedLinkLocalAddress); Assert.Equal(expected, actual); }
public void GetAsLinkLocal_EmptyMacAddress() { Assert.ThrowsAny <ArgumentNullException>(() => IPv6Address.GetAsLinkLocal(null)); }