public void TestModificarDetalleCompraCuandoNoExisteId() { _mockRepositorioDetalleCompra.Setup(m => m.ObtenerObjetos(It.IsAny <FiltroDetalleCompra>())).Returns(new List <DETALLE_COMPRA>()); try { _servicio.ModificarDetalleCompra(new DETALLE_COMPRA(), new List <short>()); } catch (Exception ex) { Assert.AreEqual("No existe detalle compra cuyo id es 0", ex.Message); return; } Assert.Fail("Test Falló."); }