Пример #1
0
        public void ClenUp()
        {
            PlayerDAO dao = new PlayerDAO();

            dao.RemovePlayerById(playerFrom.PlayerId);
            dao.RemovePlayerById(playerTo.PlayerId);
        }
Пример #2
0
        public void ClenUp()
        {
            PlayerDAO dao = new PlayerDAO();
            int       id  = dao.GetPlayerByName("player").PlayerId;

            dao.RemovePlayerById(id);
        }
Пример #3
0
        public void ClenUp()
        {
            PlayerDAO dao = new PlayerDAO();

            dao.RemovePlayerById(player.PlayerId);

            BaseDAO bas = new BaseDAO();

            bas.RemoveBaseById(newBase.BaseId);
        }
Пример #4
0
        public void RemovePlayerByIdTest()
        {
            PlayerDAO dao    = new PlayerDAO();
            Player    player = CreatePlayer();

            player.PlayerName = "player2";
            dao.InsertPlayer(player);
            int id = dao.GetPlayerByName("player2").PlayerId;

            dao.RemovePlayerById(id);
            Assert.IsNull(dao.GetPlayerById(id));
        }
Пример #5
0
        public void InsertPlayerTest()
        {
            PlayerDAO dao    = new PlayerDAO();
            Player    player = CreatePlayer();

            player.PlayerName = "player2";
            bool result = dao.InsertPlayer(player);

            Assert.IsTrue(result);
            Player insertPlayer = dao.GetPlayerByName("player2");

            dao.RemovePlayerById(insertPlayer.PlayerId);
        }
Пример #6
0
        public void ClenUp()
        {
            CargoDAO cargoDao = new CargoDAO();

            cargoDao.RemoveCargoById(cargo1.CargoId);
            cargoDao.RemoveCargoById(cargo2.CargoId);

            BaseDAO bas = new BaseDAO();

            bas.RemoveBaseById(newBase.BaseId);

            PlayerDAO playerDao = new PlayerDAO();

            playerDao.RemovePlayerById(player.PlayerId);

            SpaceShipDAO shipDao = new SpaceShipDAO();

            shipDao.RemoveSpaceShipById(ship.SpaceShipId);
        }