Beispiel #1
0
        public void ClientStop()
        {
            //---------------------------------------------------------------------
            //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);
            client.Start();

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

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

            //---------------------------------------------------------------------
            //Assert
            //---------------------------------------------------------------------
        }
        public void ClientAddConnection()
        {
            //---------------------------------------------------------------------
            //Setup
            //---------------------------------------------------------------------
            ClientLibrary.ClientConnectionUDP connection = new ClientLibrary.ClientConnectionUDP("Test_Connection", "Tester");
            ClientLibrary.Client client = new ClientLibrary.Client("Tester");

            //---------------------------------------------------------------------
            //Run Test
            //---------------------------------------------------------------------
            client.AddConnection(connection);

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

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