public void EqualsOfDifferentObjectsReturnFalse() { // Fixture setup var value = new QuadrupleParameterType <string, string, string, string>("Lorem", "ipsum", "dolor", "sit"); var other = new QuadrupleParameterType <string, string, string, string>("amet", "consectetur", "adipisicing", "elit"); // The rest of the test SemanticComparerTest.CompareSemantically(value, other, false); }
public void EqualsOfIdenticalObjectsReturnsTrue() { // Fixture setup var value = new QuadrupleParameterType <string, string, string, string>("Lorem", "ipsum", "dolor", "sit"); var other = new QuadrupleParameterType <string, string, string, string>("Lorem", "ipsum", "dolor", "sit"); // The rest of the test SemanticComparerTest.CompareSemantically(value, other, true); }
public void SemanticComparisonAgainstDataErrorInfoWillNotThrow() { // Fixture setup var likenObject = new DataErrorInfo(); var comparee = new DataErrorInfo(); // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, true); }
public void SemanticComparisonAgainstObjectWithOverloadedMembersWillNotThrow() { // Fixture setup var likenObject = new object(); var comparee = new TypeWithOverloadedMembers(); // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, false); }
public void SemanticComparisonAgainstObjectWithIndexerWillNotThrow() { // Fixture setup var likenObject = new object(); var comparee = new TypeWithIndexer(); // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, true); }
public void SemanticallyAnObjectWithPropertyWillNotBeEqualToPropertyWithDifferentProperty() { // Fixture setup var likenObject = new { SomeOtherProperty = new object() }; PropertyHolder <object> comparee = new PropertyHolder <object>(); comparee.Property = new object(); // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, false); }
public void SemanticallyAnObjectWithValuePropertyWillNotBeEqualToObjectWithNullProperty() { // Fixture setup PropertyHolder <object> likenObject = new PropertyHolder <object>(); likenObject.Property = new object(); PropertyHolder <object> comparee = new PropertyHolder <object>(); comparee.Property = null; // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, false); }
public void ObjectsWithNullPropertiesAreSemanticallyEqual() { // Fixture setup PropertyHolder <object> likenObject = new PropertyHolder <object>(); likenObject.Property = null; PropertyHolder <object> comparee = new PropertyHolder <object>(); comparee.Property = null; // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, true); }
public void ComparingStringFieldHolderSemanticallyToRealStringFieldHolderWillIndicateEquality() { // Fixture setup string anonymousText = "Anonymous text"; FieldHolder <string> likenObject = new FieldHolder <string>(); likenObject.Field = anonymousText; FieldHolder <string> comparee = new FieldHolder <string>(); comparee.Field = anonymousText; // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, true); }
public void CompareAnonymousTypeSemanticallyToStringFieldHolderWillIndicateEqualityWhenValuesAreEqual() { // Fixture setup string anonymousText = "Anonymous text"; var likenObject = new { Field = anonymousText }; FieldHolder <string> comparee = new FieldHolder <string>(); comparee.Field = anonymousText; // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, true); }
public void ComparingStringFieldHoldersWithDifferentValuesWillIndicateDifference() { // Fixture setup string anonymousText1 = "Anonymous text"; string anonymousText2 = "Some other text"; FieldHolder <string> likenObject = new FieldHolder <string>(); likenObject.Field = anonymousText1; FieldHolder <string> comparee = new FieldHolder <string>(); comparee.Field = anonymousText2; // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, false); }
public void CompareAnonymousTypeSemanticallyToStringPropertyHolderWillIndicateDifferenceWhenValuesAreDifferent() { // Fixture setup string anonymousText1 = "Anonymous text"; string anonymousText2 = "Some other text"; var likenObject = new { Field = anonymousText1 }; FieldHolder <string> comparee = new FieldHolder <string>(); comparee.Field = anonymousText2; // The rest of the test SemanticComparerTest.CompareSemantically(likenObject, comparee, false); }