public void InitializeServer()
		{
			mockServer = new MockServer();
			server = new LocalhostLogServer(mockServer);
			mockClient = new MockClient(mockServer);
			mockClient.Connect("localhost", 1);
			server.Start();
		}
 public void InitializeServer()
 {
     mockServer = new MockServer();
     server     = new LocalhostLogServer(mockServer);
     mockClient = new MockClient(mockServer);
     mockClient.Connect("localhost", 1);
     server.Start();
 }
Exemplo n.º 3
0
 public void StartLogServer()
 {
     server = new LocalhostLogServer(new TcpServer());
     server.Start();
     var ready = false;
     var connection = new OnlineServiceConnection();
     connection.DataReceived += o => ready = true;
     connection.Connect("localhost", LocalhostLogServer.Port);
     connection.Send(new LoginRequest("", "DeltaEngine.Logging.Tests"));
     logger = new NetworkLogger(connection);
     for (int timeoutMs = 1000; timeoutMs > 0 && !ready; timeoutMs -= 10)
         Thread.Sleep(10);
     Assert.IsTrue(ready);
 }
Exemplo n.º 4
0
        public void StartLogServer()
        {
            server = new LocalhostLogServer(new TcpServer());
            server.Start();
            new MockSettings();
            var ready      = false;
            var connection = new OnlineServiceConnection();

            connection.DataReceived += o => ready = true;
            connection.Connect("localhost", LocalhostLogServer.Port);
            connection.Send(new LoginRequest("", "DeltaEngine.Logging.Tests"));
            logger = new NetworkLogger(connection);
            for (int timeoutMs = 1000; timeoutMs > 0 && !ready; timeoutMs -= 10)
            {
                Thread.Sleep(10);
            }
            Assert.IsTrue(ready);
        }