public void DeleteRestaurantTest() { var id = _restaurantDao.AddRestaurant(_restaurant); _restaurantDao.DeleteRestaurant(id); Assert.Throws <RestaurantNotFoundExeption>(() => _restaurantDao.GetRestaurant(id)); }
public void Execute() { DAOFactory daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres); PostgresRestaurantDAO restaurantDao = (PostgresRestaurantDAO)daoFactory.GetRestaurantDAO(); restaurantDao.DeleteRestaurant(_id); }