public void DeleteDeliveryReportMessageTypeById_Success_Test() { // Arrange int id = 1; // create mock for repository var mock = new Mock <IDeliveryReportMessageTypeRepository>(); mock.Setup(s => s.DeleteDeliveryReportMessageType(Moq.It.IsAny <int>())).Verifiable(); // service DeliveryReportMessageTypeService deliveryReportMessageTypeService = new DeliveryReportMessageTypeService(); DeliveryReportMessageTypeService.Repository = mock.Object; // Act deliveryReportMessageTypeService.DeleteDeliveryReportMessageType(id); // Assert Assert.IsTrue(true); }
public void DeleteDeliveryReportMessageType_Success_Test() { // Arrange DeliveryReportMessageTypeDTO dto = SampleDeliveryReportMessageTypeDTO(1); dto.IsDeleted = false; // create mock for repository var mock = new Mock <IDeliveryReportMessageTypeRepository>(); mock.Setup(s => s.DeleteDeliveryReportMessageType(Moq.It.IsAny <R_DeliveryReportMessageType>())).Verifiable(); // service DeliveryReportMessageTypeService deliveryReportMessageTypeService = new DeliveryReportMessageTypeService(); DeliveryReportMessageTypeService.Repository = mock.Object; // Act deliveryReportMessageTypeService.DeleteDeliveryReportMessageType(dto); // Assert Assert.IsTrue(true); }