public async void Get_Excel_Error() { var dbContext = DbContext(GetCurrentMethod()); var serviceProvider = GetServiceProviderMock(dbContext).Object; CostCalculationGarmentFacade facade = new CostCalculationGarmentFacade(serviceProvider, dbContext); var data = await DataUtil(facade, dbContext).GetTestData(); IDistributionROGarmentReport distributionroGarmentReport = new DistributionROGarmentReportFacade(serviceProvider, dbContext); var filter = new { dateFrom = data.RODistributionDate.AddDays(30), dateTo = data.RODistributionDate.AddDays(30), }; var Response = distributionroGarmentReport.GenerateExcel(filter: JsonConvert.SerializeObject(filter)); Assert.NotNull(Response.Item2); }
public async void Get_Report_Success() { var dbContext = DbContext(GetCurrentMethod()); var serviceProvider = GetServiceProviderMock(dbContext).Object; CostCalculationGarmentFacade facade = new CostCalculationGarmentFacade(serviceProvider, dbContext); var data = await DataUtil(facade, dbContext).GetTestData(); IDistributionROGarmentReport distributionroGarmentReport = new DistributionROGarmentReportFacade(serviceProvider, dbContext); var filter = new { dateFrom = data.RODistributionDate, dateTo = data.RODistributionDate, }; var Response = distributionroGarmentReport.Read(filter: JsonConvert.SerializeObject(filter)); Assert.NotEqual(Response.Item2, 0); }