public void Should_Success_GetReportDetailAccuracyofDelivery() { GarmentDeliveryOrderFacade facade = new GarmentDeliveryOrderFacade(GetServiceProvider().Object, _dbContext(GetCurrentMethod())); var Response = facade.GetReportDetailAccuracyofDelivery("", DateTime.Now, DateTime.Now, "", "", 0); Assert.NotNull(Response); }
public async Task Should_Success_Get_Report_AccuracyDelivery() { GarmentDeliveryOrderFacade facade = new GarmentDeliveryOrderFacade(GetServiceProvider().Object, _dbContext(GetCurrentMethod())); var data = await dataUtil(facade, GetCurrentMethod()).GetNewData3(); data.DODate = DateTimeOffset.Now.AddDays(10); foreach (var item in data.Items) { foreach (var detail in item.Details) { detail.ProductCode = "LBL"; } } await facade.Create(data, USERNAME); var Facade = new GarmentDeliveryOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var Response = Facade.GetReportHeaderAccuracyofDelivery(null, null, 7); Assert.NotNull(Response.Item1); var data2 = await dataUtil(facade, GetCurrentMethod()).GetNewData3(); data2.DODate = DateTimeOffset.Now.AddDays(10); foreach (var item in data2.Items) { foreach (var detail in item.Details) { detail.ProductCode = "SUB"; } } await facade.Create(data2, USERNAME); var data3 = await dataUtil(facade, GetCurrentMethod()).GetNewData3(); data3.DODate = DateTimeOffset.Now.AddDays(10); foreach (var item in data3.Items) { foreach (var detail in item.Details) { detail.ProductCode = "SUB"; } } await facade.Create(data3, USERNAME); var data4 = await dataUtil(facade, GetCurrentMethod()).GetNewData3(); data4.DODate = DateTimeOffset.Now.AddDays(11); foreach (var item in data4.Items) { foreach (var detail in item.Details) { detail.ProductCode = "LBL"; } } await facade.Create(data4, USERNAME); var Response1 = Facade.GetReportHeaderAccuracyofDelivery(null, null, 7); Assert.NotNull(Response1.Item1); long nowTicks = DateTimeOffset.Now.Ticks; string nowTicksA = $"{nowTicks}a"; var Response2 = Facade.GetReportDetailAccuracyofDelivery($"BuyerCode{nowTicksA}", null, null, 7); Assert.NotNull(Response2.Item1); }