/// <summary> /// Metodo para ejecutar el comando modificar /// </summary> /// <returns></returns> public override bool ejecutar() { try { IDAORestaurant restaurantDao = FabricaDAO.RestaurantBD(); restaurantDao.Modificar(this._objeto); return(true); } catch (NotImplementedException e) { throw new ExceptionReserva("Reserva-404", "Metodo no implementado", e); } catch (Exception e) { throw new ExceptionReserva("Reserva-404", "Error al Realizar Operacion", e); } }
public void M10_DaoModificar() { restaurantDao = FabricaDAO.RestaurantBD(); //Parametros a modificar en la base de datos //Id del restaurante a modificar ((CRestauranteModelo)restaurant).id = 107; //Parametros que va a ser modificados ((CRestauranteModelo)restaurant).nombre = "ItaliaFood"; ((CRestauranteModelo)restaurant).descripcion = "Comida Italiana"; ((CRestauranteModelo)restaurant).direccion = "Antimano"; ((CRestauranteModelo)restaurant).Telefono = "0212-5896699"; ((CRestauranteModelo)restaurant).horarioApertura = "09:00"; ((CRestauranteModelo)restaurant).horarioCierre = "21:00"; ((CRestauranteModelo)restaurant).idLugar = 12; //Veridicar si la modificacion fue exitosa Resultado = restaurantDao.Modificar(restaurant); Assert.AreEqual(Resultado, true); }