Exemple #1
0
        public void refreshplayerlistexception()
        {
            MagicTactilForWindows.Model.Network network = null;
            try
            {
                network = new MagicTactilForWindows.Model.Network();
                network.connect("127.0.0.1", 3000);  //127.0.0.1
            }
            catch (Exception)
            {
                var message = "Unable to connect to the server";
                Assert.Fail(message);
            }

            try
            {
                MagicTactilForWindows.ViewModel.VMRooms vmrooms = new MagicTactilForWindows.ViewModel.VMRooms(network);
                vmrooms.refreshPlayerList();
                Assert.Fail("exception should have been thrown");
            }
            catch (Exception)
            {
                var message = "OK";
            }
        }
Exemple #2
0
        public void getplayerfromroom()
        {
            MagicTactilForWindows.Model.Network network = null;
            try
            {
                network = new MagicTactilForWindows.Model.Network();
                network.connect("127.0.0.1", 3000);  //127.0.0.1
            }
            catch (Exception)
            {
                var message = "Unable to connect to the server";
                Assert.Fail(message);
            }

            try
            {
                MagicTactilForWindows.ViewModel.VMRooms vmrooms = new MagicTactilForWindows.ViewModel.VMRooms(network);
                vmrooms.selectedRoom = new MagicTactilForWindows.ViewModel.Room(1, "name", "name", "name", 1);
                vmrooms.refreshPlayerList();
            }
            catch (Exception)
            {
                var message = "ola";
                Assert.Fail();
            }
        }
        public void refreshplayerlistexception()
        {
            MagicTactilForWindows.Model.Network network = null;
            try
            {
                network = new MagicTactilForWindows.Model.Network();
                network.connect("127.0.0.1", 3000);  //127.0.0.1
            }
            catch (Exception)
            {
                var message = "Unable to connect to the server";
                Assert.Fail(message);
            }

            try
            {

                MagicTactilForWindows.ViewModel.VMRooms vmrooms = new MagicTactilForWindows.ViewModel.VMRooms(network);
                vmrooms.refreshPlayerList();
                Assert.Fail("exception should have been thrown");
            }
            catch (Exception)
            {
                var message = "OK";
                
            }



        }
        public void getplayerfromroom()
        {
            MagicTactilForWindows.Model.Network network = null;
            try
            {
                network = new MagicTactilForWindows.Model.Network();
                network.connect("127.0.0.1", 3000);  //127.0.0.1
            }
            catch (Exception)
            {
                var message = "Unable to connect to the server";
                Assert.Fail(message);
            }

            try
            {

                MagicTactilForWindows.ViewModel.VMRooms vmrooms = new MagicTactilForWindows.ViewModel.VMRooms(network);
                vmrooms.selectedRoom = new MagicTactilForWindows.ViewModel.Room(1, "name", "name", "name", 1);
                vmrooms.refreshPlayerList();

            }
            catch (Exception)
            {
                var message = "ola";
                Assert.Fail();
            }



        }