public void TestThatDeleteRelationsThrowsIntranetRepositoryExceptionWhenIdentifierIsNull() { IStorageProxy sut = CreateSut(); Assert.That(sut, Is.Not.Null); Assert.That(sut.Identifier, Is.Null); Assert.That(sut.Identifier.HasValue, Is.False); IntranetRepositoryException result = Assert.Throws <IntranetRepositoryException>(() => sut.DeleteRelations(CreateFoodWasteDataProvider())); TestHelper.AssertIntranetRepositoryExceptionIsValid(result, ExceptionMessage.IllegalValue, sut.Identifier, "Identifier"); }
public void TestThatDeleteRelationsThrowsArgumentNullExceptionIfDataProviderIsNull() { IStorageProxy sut = CreateSut(); Assert.That(sut, Is.Not.Null); ArgumentNullException result = Assert.Throws <ArgumentNullException>(() => sut.DeleteRelations(null)); TestHelper.AssertArgumentNullExceptionIsValid(result, "dataProvider"); }