public void TestEquals() { var nullPropertyInformation2 = new NullPropertyInformation(); Assert.That(_nullPropertyInformation.Equals(nullPropertyInformation2), Is.True); Assert.That(_nullPropertyInformation.Equals(null), Is.False); }
public void InheritanceRoot_PersistentPropertiesFromSamePropertyInformation_InDifferentLeavesOfInheritanceTree() { var propertyInformation = new NullPropertyInformation(); var propertyDefinition1 = CreatePersistentPropertyDefinition( _derivedClass, SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Length"), propertyInformation); var propertyDefinition2 = CreatePersistentPropertyDefinition( _derivedBaseClass2, SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Length"), propertyInformation); _baseOfBaseClass.SetPropertyDefinitions(new PropertyDefinitionCollection()); _derivedBaseClass1.SetPropertyDefinitions(new PropertyDefinitionCollection()); _derivedClass.SetPropertyDefinitions(new PropertyDefinitionCollection(new[] { propertyDefinition1 }, true)); _derivedBaseClass2.SetPropertyDefinitions(new PropertyDefinitionCollection(new[] { propertyDefinition2 }, true)); _derivedClass.SetReadOnly(); _derivedBaseClass2.SetReadOnly(); var validationResult = _validationRule.Validate(_baseOfBaseClass); AssertMappingValidationResult(validationResult, true, null); }
public void SetUp() { _nullPropertyInformation = new NullPropertyInformation(); }