Esempio 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);
 }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }