public void VerifyIllbehavedEqualsSelfBehaviourThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Act & Assert Assert.Throws <EqualsOverrideException>(() => sut.Verify(typeof(IllBehavedEqualsSelfObjectOverride))); }
public void VerifyClassThatDoesNotOverrideObjectEqualsDoesNothing() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Act & Assert Assert.Null(Record.Exception(() => sut.Verify(typeof(ClassThatDoesNotOverrideObjectEquals)))); }
public void VerifyWellBehavedEqualsSelfOverrideDoesNotThrow() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Act & Assert Assert.Null(Record.Exception(() => sut.Verify(typeof(WellBehavedEqualsSelfObjectOverride)))); }
public void VerifyNullMethodThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Act & Assert Assert.Throws <ArgumentNullException>(() => sut.Verify((MethodInfo)null)); }
public void VerifyIllbehavedEqualsSelfBehaviourThrows() { // Fixture setup var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Exercise system and verify outcome Assert.Throws <EqualsOverrideException>(() => sut.Verify(typeof(IllBehavedEqualsSelfObjectOverride))); // Teardown }
public void VerifyWellBehavedEqualsSelfOverrideDoesNotThrow() { // Fixture setup var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Exercise system and verify outcome Assert.DoesNotThrow(() => sut.Verify(typeof(WellBehavedEqualsSelfObjectOverride))); // Teardown }
public void VerifyClassThatDoesNotOverrideObjectEqualsDoesNothing() { // Fixture setup var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Exercise system and verify outcome Assert.DoesNotThrow(() => sut.Verify(typeof(ClassThatDoesNotOverrideObjectEquals))); // Teardown }
public void VerifyNullMethodThrows() { // Fixture setup var dummyComposer = new Fixture(); var sut = new EqualsSelfAssertion(dummyComposer); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.Verify((MethodInfo)null)); // Teardown }