Exemplo n.º 1
0
        public void TestFixedPort_IPAddressOnlyEndpoint()
        {
            var newTarget = new TcpIpTargetInfo();

            newTarget.FixedPort  = 3001;
            newTarget.IPEndPoint = TcpIpTargetInfo.TryParseEndPointUsingPort(@"192.168.0.1", newTarget.FixedPort);
            Assert.IsNotNull(newTarget.IPEndPoint);
            Assert.AreEqual(newTarget.IPEndPoint.Port, newTarget.FixedPort);
        }
Exemplo n.º 2
0
        public void TestFixedPort_FullyQualifiedEndpoint()
        {
            var newTarget = new TcpIpTargetInfo();

            newTarget.FixedPort  = 3001;
            newTarget.IPEndPoint = TcpIpTargetInfo.TryParseEndPointUsingPort(@"192.168.0.1:12345", newTarget.FixedPort);
            Assert.IsNotNull(newTarget.IPEndPoint);
            Assert.AreEqual(newTarget.IPEndPoint.Port, newTarget.FixedPort);
        }