Пример #1
0
        public void ClientStart()
        {
            //---------------------------------------------------------------------
            //Setup
            //---------------------------------------------------------------------
            UDP_Config config;

            config.address = "127.0.0.1";
            config.port    = 4500;

            DotNetserialization serializer = new DotNetserialization();

            ClientLibrary.ClientListenerUDP   listener   = new ClientLibrary.ClientListenerUDP(config);
            ClientLibrary.ClientConnectionUDP connection = new ClientLibrary.ClientConnectionUDP("Test_Connection", "Tester");
            connection.AddListener(listener);
            connection.AddSerializer(serializer);
            ClientLibrary.Client client = new ClientLibrary.Client("Tester");
            client.AddConnection(connection);

            //---------------------------------------------------------------------
            //Run Test
            //---------------------------------------------------------------------
            client.Start();

            //---------------------------------------------------------------------
            //Gather Output
            //---------------------------------------------------------------------

            //---------------------------------------------------------------------
            //Assert
            //---------------------------------------------------------------------
        }
Пример #2
0
        public void ClientClearMessage()
        {
            //---------------------------------------------------------------------
            //Setup
            //---------------------------------------------------------------------
            ClientLibrary.ClientConnectionUDP connection = new ClientLibrary.ClientConnectionUDP("Test_Connection", "Tester");
            ClientLibrary.Client client = new ClientLibrary.Client("Tester");
            client.AddConnection(connection);

            //---------------------------------------------------------------------
            //Run Test
            //---------------------------------------------------------------------
            client.ClearMessages("Test_Connection");

            //---------------------------------------------------------------------
            //Gather Output
            //---------------------------------------------------------------------

            //---------------------------------------------------------------------
            //Assert
            //---------------------------------------------------------------------
        }