public void VerifyIllBehavedEqualityComparerThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualityComparerEqualsNullNullAssertion(dummyComposer); // Act & Assert Assert.Throws <EqualityComparerImplementationException>(() => sut.Verify(typeof(IllBehavedEqualityComparer))); }
public void VerifyWellBehavedEqualityComparerDoesNotThrow() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualityComparerEqualsNullNullAssertion(dummyComposer); // Act & Assert Assert.Null(Record.Exception(() => sut.Verify(typeof(WellBehavedEqualityComparer)))); }
public void VerifyNullMethodThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualityComparerEqualsNullNullAssertion(dummyComposer); // Act & Assert Assert.Throws <ArgumentNullException>(() => sut.Verify((MethodInfo)null)); }
public void SutIsIdiomaticAssertion() { // Arrange var dummyComposer = new Fixture(); // Act var sut = new EqualityComparerEqualsNullNullAssertion(dummyComposer); // Assert Assert.IsAssignableFrom <IdiomaticAssertion>(sut); }
public void ComposerIsCorrect() { // Arrange var expectedComposer = new Fixture(); var sut = new EqualityComparerEqualsNullNullAssertion(expectedComposer); // Act ISpecimenBuilder result = sut.Builder; // Assert Assert.Equal(expectedComposer, result); }