public async Task Should_Success_Get_Report_Purchase_All_Excel() { GarmentCorrectionNoteQuantityFacade facade = new GarmentCorrectionNoteQuantityFacade(GetServiceProvider().Object, _dbContext(GetCurrentMethod())); var data = await dataUtil(facade, GetCurrentMethod()).GetNewData(); await facade.Create(data, false, USERNAME); var Facade = new GarmentPurchaseRequestFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var Response = Facade.GenerateExcelPurchase(null, null, null, null, null, null, null, null, null, null, null, null, 1, 25, "{}", 7); Assert.IsType(typeof(System.IO.MemoryStream), Response); }
public async Task Should_Success_Get_Report_Purchase_All_Excel() { GarmentCorrectionNoteQuantityFacade facade = new GarmentCorrectionNoteQuantityFacade(GetServiceProvider().Object, _dbContext(GetCurrentMethod())); var data = await dataUtil(facade, GetCurrentMethod()).GetNewData(); await facade.Create(data, false, USERNAME); var Facade = new GarmentPurchaseRequestFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var dateTo = DateTime.Now; var dateFrom = DateTime.Now.AddDays(-30); var dateFromEx = DateTimeOffset.MinValue; var dateToEx = DateTimeOffset.Now; var Response = Facade.GenerateExcelPurchase(null, null, null, null, null, null, null, null, null, null, dateFrom, dateTo, dateFromEx, dateToEx, 1, 25, "{}", 7); Assert.IsType <System.IO.MemoryStream>(Response); }