public async Task Should_Success_Get_Data_By_RO() { var facade = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var data = await dataUtil(facade, GetCurrentMethod()).GetNewDataFabric(); var Responses = await facade.Create(data, USERNAME); var ro = data.Items.First().RONo; var Response = facade.ReadItemByRO(); Assert.NotNull(Response); }
public async Task <GarmentExternalPurchaseOrder> GetTestDataFabric() { var data = await GetNewDataFabric(); await facade.Create(data, "Unit Test"); return(data); }
public async Task Should_Success_Get_Data_By_Supplier() { var facade = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var data = await dataUtil(facade, GetCurrentMethod()).GetNewDataACC(); var Responses = await facade.Create(data, USERNAME); var Response = facade.ReadBySupplier(data.SupplierCode); Assert.NotNull(Response); var Response2 = facade.ReadItemByRO(); Assert.NotNull(Response2); }
public async void Should_Success_Get_Report_POIPOEDuration_Excel() { var facade = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var data = EPOdataUtil(facade, GetCurrentMethod()).GetNewDataFabric(); await facade.Create(data, USERNAME); GarmentInternalPurchaseOrderFacade Facade = new GarmentInternalPurchaseOrderFacade(_dbContext(GetCurrentMethod())); var Response = Facade.GenerateExcelIPOEPODuration("", "8-14 hari", null, null, 7); Assert.IsType(typeof(System.IO.MemoryStream), Response); var Response1 = Facade.GenerateExcelIPOEPODuration("", "0-7 hari", null, null, 7); Assert.IsType(typeof(System.IO.MemoryStream), Response1); }
public async void Should_Success_Get_Report_POIPOExDuration_Data() { var facade = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var data = EPOdataUtil(facade, GetCurrentMethod()).GetNewDataFabric(); await facade.Create(data, USERNAME); GarmentInternalPurchaseOrderFacade Facade = new GarmentInternalPurchaseOrderFacade(_dbContext(GetCurrentMethod())); var Response = Facade.GetIPOEPODurationReport("", "0-7 hari", null, null, 1, 25, "{}", 7); Assert.NotEqual(Response.Item2, 0); var Response1 = Facade.GetIPOEPODurationReport("", "8-14 hari", null, null, 1, 25, "{}", 7); Assert.NotNull(Response1.Item1); var Response2 = Facade.GetIPOEPODurationReport("", "15-30 hari", null, null, 1, 25, "{}", 7); Assert.NotNull(Response2.Item1); var Response3 = Facade.GetIPOEPODurationReport("", ">30 hari", null, null, 1, 25, "{}", 7); Assert.NotNull(Response3.Item1); }
public async void Should_Success_Create_Data_Fabric() { var facade = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var data = EPOdataUtil(facade, GetCurrentMethod()).GetNewDataFabric(); await facade.Create(data, USERNAME); }