public async Task Should_Success_Get_Excel() { var dbContext = _dbContext(GetCurrentMethod()); var facadeExpend = new GarmentUnitReceiptNoteFacade(GetServiceProvider().Object, _dbContext(GetCurrentMethod())); var facade = new MonitoringUnitReceiptAllFacade(GetServiceProvider().Object, _dbContext(GetCurrentMethod())); var data = await garmentUnitReceiptNoteDataUtil(facadeExpend, GetCurrentMethod()).GetTestDataMonitoringFlow(); var Response = facade.GenerateExcel(null, "POSerialNumber", "RONo", "DONo", "SMP1", "SupplierCode", DateTime.Now.AddDays(-1), DateTime.Now.AddDays(1), 1, 25, "", 7); Assert.NotNull(Response); }
public async void Should_Success_Get_Report_Excel() { GarmentDeliveryOrderFacade facade = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(GetCurrentMethod())); var data = dataUtilDO(facade, GetCurrentMethod()).GetNewData(); await facade.Create(data, USERNAME); var uFacade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod())); var datas = dataUtil(uFacade, GetCurrentMethod()).GetNewDataWithStorage(); var Responses = await uFacade.Create(datas); Assert.NotEqual(Responses, 0); var Facade = new MonitoringUnitReceiptAllFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var Response = Facade.GetReport(null, null, null, null, null, null, null, null, 1, 25, "{}", 7); Assert.NotEqual(Response.Item2, 0); var Response1 = Facade.GenerateExcel(null, null, null, null, null, null, null, null, 1, 25, "{}", 7); Assert.IsType(typeof(System.IO.MemoryStream), Response1); }
public async Task Should_Success_Get_Report_Data() { GarmentDeliveryOrderFacade facade = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(GetCurrentMethod())); var data = await dataUtilDO(facade, GetCurrentMethod()).GetNewData(); await facade.Create(data, USERNAME); var uFacade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod())); var datas = await dataUtil(uFacade, GetCurrentMethod()).GetNewDataWithStorage(); var Responses = await uFacade.Create(datas); Assert.NotEqual(Responses, 0); var Facade = new MonitoringUnitReceiptAllFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var Response = Facade.GetReport(null, null, null, null, null, null, null, null, 1, 25, "{}", 7); Assert.NotEqual(Response.Item2, 0); var Response1 = Facade.GetReport(null, null, null, null, null, null, null, null, 1, 25, "{}", 7); Assert.NotNull(Response1.Item1); }