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 }
public void SutIsIdiomaticAssertion() { // Fixture setup var dummyComposer = new Fixture(); // Exercise system var sut = new EqualsSelfAssertion(dummyComposer); // Verify outcome Assert.IsAssignableFrom<IdiomaticAssertion>(sut); // Teardown }
public void ComposerIsCorrect() { // Fixture setup var expectedComposer = new Fixture(); var sut = new EqualsSelfAssertion(expectedComposer); // Exercise system ISpecimenBuilder result = sut.Builder; // Verify outcome Assert.Equal(expectedComposer, result); // Teardown }
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 }