예제 #1
0
        public void EnvironmentConnectionReconnectToServerExpecetedClientConnectionSuccessful()
        {
            IEnvironmentConnection conn = CreateConnection();

            conn.Connect(Guid.Empty);
            conn.Disconnect();
            Thread.Sleep(100);
            conn.Connect(Guid.Empty);
            Thread.Sleep(500);
            bool afterReconnection = conn.IsConnected;

            Assert.IsTrue(afterReconnection);

            conn.Disconnect();
        }
        public void EnvironmentConnection_ConnectToAvailableServer_Expected_ConnectionSuccesful()
        {
            IEnvironmentConnection conn = CreateConnection();

            conn.Connect(Guid.Empty);
            Assert.IsTrue(conn.IsConnected);
            conn.Disconnect();
        }
예제 #3
0
        public void EnsureServerListensOnLocalhost_ExpectedConnectionSuccessful()
        {
            var setupEnvironmentConnection = SetupEnvironmentConnection();
            IEnvironmentConnection conn    = setupEnvironmentConnection;

            conn.Connect(Guid.Empty);
            Assert.IsTrue(conn.IsConnected);
            conn.Disconnect();
        }
예제 #4
0
        public void EnsureServerListensOnPcName_ExpectedConnectionSuccessful()
        {
            var setupEnvironmentConnection = SetupEnvironmentConnection();
            IEnvironmentConnection conn    = setupEnvironmentConnection;

            conn.Connect(Guid.Empty);
            var res = conn.IsConnected;

            conn.Disconnect();
            Assert.IsTrue(res);
        }
예제 #5
0
        public void EnvironmentConnectionWithServerAuthenticationExpectedClientDetailsRecieved()
        {
            IEnvironmentConnection conn = CreateConnection();

            conn.Connect(Guid.Empty);
            // The IsConnected property of the EnvironmentConnection references the TCPDispatch Client
            // Only if the connection to the server is successfully made by the dispatch client will the
            // IsConnected message return true
            Assert.IsTrue(conn.IsConnected);

            conn.Disconnect();
        }
예제 #6
0
 public void Disconnect()
 {
     _wrappedConnection.Disconnect();
 }