public void VerifyWellBehavedEqualityComparerDoesNotThrow() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualityComparerAssertion(dummyComposer); // Act & Assert Assert.Null(Record.Exception(() => sut.Verify(typeof(WellBehavedEqualityComparer)))); }
public void VerifyIllBehavedSelfEqualityComparerThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualityComparerAssertion(dummyComposer); // Act & Assert Assert.Throws <EqualityComparerImplementationException>(() => sut.Verify(typeof(IllBehavedSelfEqualityComparer))); }
public void VerifyNullMethodThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualityComparerAssertion(dummyComposer); // Act & Assert Assert.Throws <ArgumentNullException>(() => sut.Verify((MethodInfo)null)); }
public void EqualityComparer_is_correctly_implemented(Type type, EqualityComparerAssertion assertion) => assertion.Verify(type);