/// <summary> /// The run tcp client tests. /// </summary> private static void RunTcpClientTests() { Console.Clear(); Console.WriteLine("---------------------------------------"); Console.WriteLine("Tcp protocol version 1.5 (byte codes)"); Console.WriteLine("---------------------------------------"); var unitTests = new TcpTests(); TestTcpClient(unitTests); Thread.Sleep(1000); Console.WriteLine(); Console.WriteLine(); Console.WriteLine("Tests finished."); Console.WriteLine("Press key to continue"); Console.ReadKey(true); Console.Clear(); }
/// <summary> /// The test tcp client. /// </summary> /// <param name="unitTests"> /// The unit tests. /// </param> private static void TestTcpClient(TcpTests unitTests) { Console.WriteLine("Send ping"); unitTests.SendPing(); Console.WriteLine("Join"); unitTests.Join(); Console.WriteLine("Join with channel"); unitTests.JoinWithChannel(); Console.WriteLine("Join with int properties"); unitTests.JoinWithPropertiesInt(); Console.WriteLine("Join with string properties"); unitTests.JoinWithPropertiesString(); Console.WriteLine("Send custom event"); unitTests.SendCustomEvent(); Console.WriteLine("Set properties with broadcast"); unitTests.SetPropertiesWithBroadcast(); Console.WriteLine("Set properties with boradcast (Version 1.5)"); unitTests.SetPropertiesWithBroadcastV15(); Console.WriteLine(); }