Example #1
0
        public void GetIP4AddressTest_CorrectIP()
        {
            // Testing correct path.
            String localName = m_library.GetLocalName();

            System.Net.IPHostEntry IPHEntry = m_communications.GetIPHostInfo(localName);
            IPAddress actualAddress         = m_communications.GetIP4Address(IPHEntry);
            String    actualAddressString   = actualAddress.ToString();

            bool isCorrectlyFormatted = actualAddressString.Contains("192.168.");

            String Message = String.Format("IP4 Address did not contain 192.168.  Actual: {0}", actualAddressString);

            Assert.IsTrue(isCorrectlyFormatted, Message);
        }