Beispiel #1
0
 public void CleanUp()
 {
     if (cargo != null)
     {
         CargoDAO cargoDao = new CargoDAO();
         cargoDao.RemoveCargoById(cargo.CargoId);
         cargoDao.RemoveCargoById(oldId);
     }
 }
Beispiel #2
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);
        }
Beispiel #3
0
        public void RemoveCargoByIdTest()
        {
            CargoDAO target = new CargoDAO();

            cargo = CreateCargo();
            target.InsertCargo(cargo);
            bool remove = target.RemoveCargoById(cargo.CargoId);

            Assert.IsTrue(remove);
            cargo = null;
        }
Beispiel #4
0
 public void TestCleanUp()
 {
     if (cargo != null)
     {
         CargoDAO dao = new CargoDAO();
         dao.RemoveCargoById(cargo.CargoId);
     }
     if (bas != null)
     {
         BaseDAO baseDAO = new BaseDAO();
         baseDAO.RemoveBaseById(bas.BaseId);
     }
 }