public async void Should_Error_Delete_Data() { PurchasingDispositionFacade facade = new PurchasingDispositionFacade(ServiceProvider, _dbContext(GetCurrentMethod())); Exception e = await Assert.ThrowsAsync <Exception>(async() => facade.Delete(0, USERNAME)); Assert.NotNull(e.Message); }
public async void Should_Success_Delete_Data() { PurchasingDispositionFacade facade = new PurchasingDispositionFacade(ServiceProvider, _dbContext(GetCurrentMethod())); var Data = await _dataUtil(facade, GetCurrentMethod()).GetTestData(); int Deleted = facade.Delete((int)Data.Id, USERNAME); Assert.True(Deleted > 0); }