public void VerifyIllbehavedEqualsSuccessiveBehaviourThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSuccessiveAssertion(dummyComposer); // Act & Assert Assert.Throws <EqualsOverrideException>(() => sut.Verify(typeof(IllBehavedEqualsSuccessiveObjectOverride))); }
public void VerifyClassThatDoesNotOverrideObjectEqualsDoesNothing() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSuccessiveAssertion(dummyComposer); // Act & Assert Assert.Null(Record.Exception(() => sut.Verify(typeof(ClassThatDoesNotOverrideObjectEquals)))); }
public void VerifyWellBehavedEqualsSuccessiveOverrideDoesNotThrow() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSuccessiveAssertion(dummyComposer); // Act & Assert Assert.Null(Record.Exception(() => sut.Verify(typeof(WellBehavedEqualsSuccessiveObjectOverride)))); }
public void VerifyNullMethodThrows() { // Arrange var dummyComposer = new Fixture(); var sut = new EqualsSuccessiveAssertion(dummyComposer); // Act & Assert Assert.Throws <ArgumentNullException>(() => sut.Verify((MethodInfo)null)); }
public void VerifyIllbehavedEqualsSuccessiveBehaviourThrows() { // Fixture setup var dummyComposer = new Fixture(); var sut = new EqualsSuccessiveAssertion(dummyComposer); // Exercise system and verify outcome Assert.Throws <EqualsOverrideException>(() => sut.Verify(typeof(IllBehavedEqualsSuccessiveObjectOverride))); // Teardown }
public void VerifyWellBehavedEqualsSuccessiveOverrideDoesNotThrow() { // Fixture setup var dummyComposer = new Fixture(); var sut = new EqualsSuccessiveAssertion(dummyComposer); // Exercise system and verify outcome Assert.DoesNotThrow(() => sut.Verify(typeof(WellBehavedEqualsSuccessiveObjectOverride))); // Teardown }
public void VerifyClassThatDoesNotOverrideObjectEqualsDoesNothing() { // Fixture setup var dummyComposer = new Fixture(); var sut = new EqualsSuccessiveAssertion(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 EqualsSuccessiveAssertion(dummyComposer); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.Verify((MethodInfo)null)); // Teardown }