public async void Should_Success_EPOUnpost() { GarmentExternalPurchaseOrderFacade facade = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); GarmentExternalPurchaseOrder model = await dataUtil(facade, GetCurrentMethod()).GetTestDataAcc(); var Response = facade.EPOUnpost((int)model.Id, "Unit Test"); Assert.NotEqual(Response, 0); }
public async Task Should_Error_EPOUnpost() { GarmentExternalPurchaseOrderFacade facade = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var model = await dataUtil(facade, GetCurrentMethod()).GetTestDataAcc(); Exception errorInvalidId = Assert.Throws <Exception>(() => facade.EPOUnpost(0, USERNAME)); Assert.NotNull(errorInvalidId.Message); }