public async Task Estab_Edit_IEBT_Null_Id() { var response = await ObjectUnderTest.EditIEBT(null as int?); Assert.IsTrue(response is HttpNotFoundResult); }
public async Task Estab_Edit_IEBT_Id_NotFound() { GetMock <IEstablishmentReadService>().Setup(e => e.GetAsync(It.IsAny <int>(), It.IsAny <IPrincipal>())).ReturnsAsync(() => new ServiceResultDto <EstablishmentModel>(eServiceResultStatus.NotFound)); Assert.That(async() => await ObjectUnderTest.EditIEBT(4), Throws.TypeOf <EntityNotFoundException>(), "Expected exception of type EntityNotFoundException"); }