public void ConvertFromBinary_ValidInput()
        {
            // arrange
            string input       = "10101010.10101010.10101010.10101010";
            var    firstOctet  = 170;
            var    secondOctet = 170;
            var    thirdOctet  = 170;
            var    fourthOctet = 170;

            // act
            var result = _converter.ConvertFromBinary(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 GetAddressFromBinaryString(string input)
 {
     return(Converter.ConvertFromBinary(input));
 }