public async Task Estab_Edit_Location_Null_Id() { var response = await ObjectUnderTest.EditLocation(null as int?); Assert.IsTrue(response is HttpNotFoundResult); }
public async Task Estab_Edit_Location_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.EditLocation(4), Throws.TypeOf <EntityNotFoundException>(), "Expected exception of type EntityNotFoundException"); }