public void TestThatSaveRelationsThrowsIntranetRepositoryExceptionWhenIdentifierIsNull() { IPaymentProxy 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.SaveRelations(CreateFoodWasteDataProvider(), _fixture.Create <bool>())); TestHelper.AssertIntranetRepositoryExceptionIsValid(result, ExceptionMessage.IllegalValue, sut.Identifier, "Identifier"); }
public void TestThatSaveRelationsThrowsArgumentNullExceptionIfDataProviderIsNull() { IPaymentProxy sut = CreateSut(); Assert.That(sut, Is.Not.Null); ArgumentNullException result = Assert.Throws <ArgumentNullException>(() => sut.SaveRelations(null, _fixture.Create <bool>())); TestHelper.AssertArgumentNullExceptionIsValid(result, "dataProvider"); }