public void ConvertFromDecimal_ValidIp()
        {
            // arrange
            var    input       = "192.168.1.1";
            ushort firstOctet  = 192;
            ushort secondOctet = 168;
            ushort thirdOctet  = 1;
            ushort fourthOctet = 1;
            // act
            var result = _converter.ConvertFromDecimal(input);

            // assert
            Assert.NotNull(result);
            Assert.AreEqual(firstOctet, result.FirstOctet);
            Assert.AreEqual(secondOctet, result.SecondOctet);
            Assert.AreEqual(thirdOctet, result.ThirdOctet);
            Assert.AreEqual(fourthOctet, result.FourthOctet);
        }
Exemplo n.º 2
0
 public Ipv4Address GetAddressFromDecimalString(string input)
 {
     return(Converter.ConvertFromDecimal(input));
 }