public void Should_Error_Get_Report_All() { var mockFacade = new Mock <IUnitPaymentOrderFacade>(); var mockMapper = new Mock <IMapper>(); UnitPaymentOrderController controller = GetController(mockFacade, null, mockMapper); var response = controller.GetReportAll(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <DateTime>(), It.IsAny <DateTime>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>()); Assert.Equal((int)HttpStatusCode.InternalServerError, GetStatusCode(response)); }
public void Should_Success_Get_Report_All() { var mockFacade = new Mock <IUnitPaymentOrderFacade>(); mockFacade.Setup(x => x.GetReportAll(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <DateTime>(), It.IsAny <DateTime>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>(), It.IsAny <int>())) .Returns(Tuple.Create(new List <UnitPaymentOrderReportViewModel>(), 5)); var mockMapper = new Mock <IMapper>(); UnitPaymentOrderController controller = GetController(mockFacade, null, mockMapper); var response = controller.GetReportAll(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <DateTime>(), It.IsAny <DateTime>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>()); Assert.Equal((int)HttpStatusCode.OK, GetStatusCode(response)); }