Ejemplo n.º 1
0
        public void Should_Error_Get_Report()
        {
            var mockFacade    = new Mock <IGarmentInternNoteFacade>();
            var mockMapper    = new Mock <IMapper>();
            var IPOmockFacade = new Mock <IGarmentDeliveryOrderFacade>();
            var INVFacade     = new Mock <IGarmentInvoice>();

            GarmentInternNoteController controller = GetController(mockFacade, IPOmockFacade, null, mockMapper, INVFacade);
            var response = controller.GetReportIN(It.IsAny <DateTime>(), It.IsAny <DateTime>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <string>());

            Assert.Equal((int)HttpStatusCode.InternalServerError, GetStatusCode(response));
        }
Ejemplo n.º 2
0
        public void Should_Success_Get_Report()
        {
            var mockFacade = new Mock <IGarmentInternNoteFacade>();

            mockFacade.Setup(x => x.GetReport(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), 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 <GarmentInternNoteReportViewModel>(), 5));
            var mockMapper = new Mock <IMapper>();
            //mockMapper.Setup(x => x.Map<List<GarmentInternNoteViewModel>>(It.IsAny<List<GarmentInternNote>>()))
            //.Returns(new List<GarmentInternNoteViewModel> { ViewModel });
            //var mockFacade = new Mock<IGarmentInternNoteFacade>();
            var IPOmockFacade = new Mock <IGarmentDeliveryOrderFacade>();
            var INVFacade     = new Mock <IGarmentInvoice>();

            GarmentInternNoteController controller = GetController(mockFacade, IPOmockFacade, null, mockMapper, INVFacade);
            var response = controller.GetReportIN(It.IsAny <DateTime>(), It.IsAny <DateTime>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>());

            Assert.Equal((int)HttpStatusCode.OK, GetStatusCode(response));
        }