Exemplo n.º 1
0
        public void GridionClientServerTest()
        {
            var serverConfiguration = GridionServerConfiguration.GetDefault();

            using (var server = GridionServerFactory.RegisterNewServer(serverConfiguration))
            {
                using (var cts = new CancellationTokenSource())
                {
                    server.StartListenAsync(cts.Token);

                    Assert.IsTrue(server.IsListening, "server.IsListening");

                    var client = GridionClientFactory.Create();
                    var clientConfiguration = new GridionClientConfiguration(serverConfiguration.Host, serverConfiguration.Port);
                    client.Connect(clientConfiguration.Host, clientConfiguration.Port);

                    Assert.IsTrue(server.IsListening, "server.IsListening");
                    Assert.IsTrue(client.IsConnected, "client.IsConnected");
                }
            }
        }
Exemplo n.º 2
0
 public void GridionClientTest()
 {
     var client = GridionClientFactory.Create();
 }