Ejemplo n.º 1
0
 public void Equality ()
 {
     var clientA = new TCPClient (new System.Net.Sockets.TcpClient ());
     TCPClient clientA2 = clientA;
     var clientB = new TCPClient (new System.Net.Sockets.TcpClient ());
     Assert.IsTrue (clientA.Equals (clientA));
     Assert.IsFalse (clientA.Equals (clientB));
     Assert.IsTrue (clientA == clientA2);
     Assert.IsFalse (clientA == clientB);
     Assert.IsFalse (clientA != clientA2);
     Assert.IsTrue (clientA != clientB);
 }
Ejemplo n.º 2
0
        public void Equality()
        {
            var       clientA  = new TCPClient(new System.Net.Sockets.TcpClient());
            TCPClient clientA2 = clientA;
            var       clientB  = new TCPClient(new System.Net.Sockets.TcpClient());

            Assert.IsTrue(clientA.Equals(clientA));
            Assert.IsFalse(clientA.Equals(clientB));
            Assert.IsTrue(clientA == clientA2);
            Assert.IsFalse(clientA == clientB);
            Assert.IsFalse(clientA != clientA2);
            Assert.IsTrue(clientA != clientB);
        }
Ejemplo n.º 3
0
        public void Equality()
        {
            Assert.IsFalse (new TCPClient (null).Equals (new TCPClient (null)));
            Assert.IsFalse (new TCPClient (null) == new TCPClient (null));
            Assert.IsTrue (new TCPClient (null) != new TCPClient (null));

            var clientA = new TCPClient (null);
            TCPClient clientA2 = clientA;
            var clientB = new TCPClient (null);
            Assert.IsTrue (clientA.Equals (clientA));
            Assert.IsFalse (clientA.Equals (clientB));
            Assert.IsTrue (clientA == clientA2);
            Assert.IsFalse (clientA == clientB);
            Assert.IsFalse (clientA != clientA2);
            Assert.IsTrue (clientA != clientB);

            Assert.IsFalse (clientA.Equals (null));
            Assert.IsFalse (clientA == null);
            Assert.IsTrue (clientA != null);
        }
Ejemplo n.º 4
0
        public void Equality()
        {
            Assert.IsFalse(new TCPClient(null).Equals(new TCPClient(null)));
            Assert.IsFalse(new TCPClient(null) == new TCPClient(null));
            Assert.IsTrue(new TCPClient(null) != new TCPClient(null));

            var       clientA  = new TCPClient(null);
            TCPClient clientA2 = clientA;
            var       clientB  = new TCPClient(null);

            Assert.IsTrue(clientA.Equals(clientA));
            Assert.IsFalse(clientA.Equals(clientB));
            Assert.IsTrue(clientA == clientA2);
            Assert.IsFalse(clientA == clientB);
            Assert.IsFalse(clientA != clientA2);
            Assert.IsTrue(clientA != clientB);

            Assert.IsFalse(clientA.Equals(null));
            Assert.IsFalse(clientA == null);
            Assert.IsTrue(clientA != null);
        }