Beispiel #1
0
        public void IsLocalIp_NullEmpty()
        {
            var connection = new KernelConnection();

            connection.IpAddress = null;
            Assert.IsFalse(connection.IsLocalIp());
            connection.IpAddress = string.Empty;
            Assert.IsFalse(connection.IsLocalIp());
            connection.IpAddress = "    ";
            Assert.IsFalse(connection.IsLocalIp());
        }
Beispiel #2
0
        public void IsLocalIp_IsLocal()
        {
            var connection = new KernelConnection();

            connection.IpAddress = KernelConnection.LOCALHOST;
            Assert.IsTrue(connection.IsLocalIp());
        }
Beispiel #3
0
        public void IsLocalIp_NotLocal()
        {
            var connection = new KernelConnection();

            connection.IpAddress = "1.2.3.4";
            Assert.IsFalse(connection.IsLocalIp());
        }