public void SetUp() { _storageProviderDefinition = new UnitTestStorageProviderStubDefinition("SPID"); _timestampProperty = SimpleStoragePropertyDefinitionObjectMother.TimestampProperty; _objectIDProperty = ObjectIDStoragePropertyDefinitionObjectMother.ObjectIDProperty; _property1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column1"); _property2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column2"); _property3 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column3"); _synonyms = new[] { new EntityNameDefinition(null, "Test") }; _baseEntityDefinition = TableDefinitionObjectMother.Create(_storageProviderDefinition); _indexes = new[] { MockRepository.GenerateStub <IIndexDefinition>() }; _filterViewDefinition = new FilterViewDefinition( _storageProviderDefinition, new EntityNameDefinition("Schema", "Test"), _baseEntityDefinition, new[] { "ClassId1", "ClassId2" }, _objectIDProperty, _timestampProperty, new[] { _property1, _property2, _property3 }, _indexes, _synonyms); }
public override void SetUp() { base.SetUp(); _dbCommandBuilderFactoryStrictMock = MockRepository.GenerateStrictMock <IDbCommandBuilderFactory>(); _objectReaderFactoryStrictMock = MockRepository.GenerateStrictMock <IObjectReaderFactory>(); _dataStoragePropertyDefinitionFactoryStrictMock = MockRepository.GenerateStrictMock <IDataStoragePropertyDefinitionFactory> (); _factory = new QueryCommandFactory( _objectReaderFactoryStrictMock, _dbCommandBuilderFactoryStrictMock, _dataStoragePropertyDefinitionFactoryStrictMock); _dataContainerReader1Stub = MockRepository.GenerateStub <IObjectReader <DataContainer> >(); _resultRowReaderStub = MockRepository.GenerateStub <IObjectReader <IQueryResultRow> >(); _queryParameter1 = new QueryParameter("first", DomainObjectIDs.Order1); _queryParameter2 = new QueryParameter("second", DomainObjectIDs.Order3.Value); _queryParameter3 = new QueryParameter("third", DomainObjectIDs.Official1); var collection = new QueryParameterCollection { _queryParameter1, _queryParameter2, _queryParameter3 }; _queryStub = MockRepository.GenerateStub <IQuery>(); _queryStub.Stub(stub => stub.Statement).Return("statement"); _queryStub.Stub(stub => stub.Parameters).Return(new QueryParameterCollection(collection, true)); _property1 = ObjectIDStoragePropertyDefinitionObjectMother.Create("Test"); _property2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty(); _property3 = SerializedObjectIDStoragePropertyDefinitionObjectMother.Create("Test"); }
public void SetUp() { _storageProviderDefinition = new UnitTestStorageProviderStubDefinition("SPID"); _objectIDProperty = ObjectIDStoragePropertyDefinitionObjectMother.ObjectIDProperty; _timestampProperty = SimpleStoragePropertyDefinitionObjectMother.TimestampProperty; _property1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column1"); _property2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column2"); _property3 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column3"); _constraints = new[] { new PrimaryKeyConstraintDefinition("PK_Table", true, new[] { ColumnDefinitionObjectMother.IDColumn }) }; _indexes = new[] { MockRepository.GenerateStub <IIndexDefinition>() }; _synonyms = new[] { new EntityNameDefinition(null, "Test") }; _tableDefinition = new TableDefinition( _storageProviderDefinition, new EntityNameDefinition("TableSchema", "TableTest"), new EntityNameDefinition("Schema", "Test"), _objectIDProperty, _timestampProperty, new[] { _property1, _property2, _property3 }, _constraints, _indexes, _synonyms); }
public void SetUp() { _storageProviderID = "DefaultStorageProvider"; _storageProviderDefinition = new UnitTestStorageProviderStubDefinition(_storageProviderID); _infrastructureStoragePropertyDefinitionProviderMock = MockRepository.GenerateStrictMock <IInfrastructureStoragePropertyDefinitionProvider>(); _storagePropertyDefinitionResolverMock = MockRepository.GenerateStrictMock <IStoragePropertyDefinitionResolver>(); _storageNameProviderMock = MockRepository.GenerateStrictMock <IStorageNameProvider>(); _foreignKeyConstraintDefinitionFactoryMock = MockRepository.GenerateStrictMock <IForeignKeyConstraintDefinitionFactory>(); _factory = new RdbmsStorageEntityDefinitionFactory( _infrastructureStoragePropertyDefinitionProviderMock, _foreignKeyConstraintDefinitionFactoryMock, _storagePropertyDefinitionResolverMock, _storageNameProviderMock, _storageProviderDefinition); _testModel = new RdbmsPersistenceModelLoaderTestHelper(); _fakeObjectIDStorageProperty = ObjectIDStoragePropertyDefinitionObjectMother.ObjectIDProperty; _fakeStorageProperty1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test1"); _fakeTimestampStorageProperty = SimpleStoragePropertyDefinitionObjectMother.TimestampProperty; _fakeForeignKeyConstraint = new ForeignKeyConstraintDefinition( "FakeForeignKeyConstraint", new EntityNameDefinition(null, "Test"), new[] { StoragePropertyDefinitionTestHelper.GetIDColumnDefinition(_fakeObjectIDStorageProperty) }, new[] { _fakeStorageProperty1.ColumnDefinition }); }
public void SetUp() { _storageTypeInformationStub = MockRepository.GenerateStub <IStorageTypeInformation>(); _innerColumnDefinition = ColumnDefinitionObjectMother.CreateColumn(storageTypeInformation: _storageTypeInformationStub); _storagePropertyDefinition = new SimpleStoragePropertyDefinition(typeof(string), _innerColumnDefinition); _dbCommandStub = MockRepository.GenerateStub <IDbCommand>(); _dbDataParameterStub = MockRepository.GenerateStub <IDbDataParameter> (); _dbCommandStub.Stub(stub => stub.CreateParameter()).Return(_dbDataParameterStub); }
public void UnifyWithEquivalentProperties_ThrowsForDifferentPropertyType() { var columnDefinition = ColumnDefinitionObjectMother.CreateColumn(); var property1 = new SimpleStoragePropertyDefinition(typeof(int), columnDefinition); var property2 = new SimpleStoragePropertyDefinition(typeof(string), columnDefinition); Assert.That( () => property1.UnifyWithEquivalentProperties(new[] { property2 }), Throws.ArgumentException.With.Message.EqualTo( "Only equivalent properties can be combined, but this property has property type 'System.Int32', and the given property has " + "property type 'System.String'.\r\nParameter name: equivalentProperties")); }
public void UnifyWithEquivalentProperties_ThrowsForDifferentPrimaryKeyFlag() { var storageTypeInformation = StorageTypeInformationObjectMother.CreateStorageTypeInformation(); var property1 = new SimpleStoragePropertyDefinition(typeof(int), ColumnDefinitionObjectMother.CreateColumn("Col", storageTypeInformation, true)); var property2 = new SimpleStoragePropertyDefinition(typeof(int), ColumnDefinitionObjectMother.CreateColumn("Col", storageTypeInformation, false)); Assert.That( () => property1.UnifyWithEquivalentProperties(new[] { property2 }), Throws.ArgumentException.With.Message.EqualTo( "Only equivalent properties can be combined, but this property has primary key flag 'True', and the given property has " + "primary key flag 'False'.\r\nParameter name: equivalentProperties")); }
public static TableDefinition Create( StorageProviderDefinition storageProviderDefinition, EntityNameDefinition tableName, EntityNameDefinition viewName, ObjectIDStoragePropertyDefinition objectIDPropertyDefinition, SimpleStoragePropertyDefinition timestampPropertyDefinition, params IRdbmsStoragePropertyDefinition[] dataPropertyDefinitions) { return(Create( storageProviderDefinition, tableName, viewName, objectIDPropertyDefinition, timestampPropertyDefinition, dataPropertyDefinitions, new ITableConstraintDefinition[0])); }
public override void SetUp() { base.SetUp(); _factory = new SqlTableScriptElementFactory(); var column1 = new ColumnDefinition("Column1", StorageTypeInformationObjectMother.CreateVarchar100StorageTypeInformation(false), false); var column2 = new ColumnDefinition("Column2", StorageTypeInformationObjectMother.CreateBitStorageTypeInformation(true), false); var property1 = new SimpleStoragePropertyDefinition(typeof(string), column1); var property2 = new SimpleStoragePropertyDefinition(typeof(bool), column2); var idColumn = new ColumnDefinition("ID", StorageTypeInformationObjectMother.CreateUniqueIdentifierStorageTypeInformation(false), true); var classIDColumn = new ColumnDefinition("ClassID", StorageTypeInformationObjectMother.CreateVarchar100StorageTypeInformation(true), false); var objectIDProperty = new ObjectIDStoragePropertyDefinition( new SimpleStoragePropertyDefinition(typeof(object), idColumn), new SimpleStoragePropertyDefinition(typeof(string), classIDColumn)); var timestampColumn = new ColumnDefinition("Timestamp", StorageTypeInformationObjectMother.CreateDateTimeStorageTypeInformation(true), false); var timestampProperty = new SimpleStoragePropertyDefinition(typeof(object), timestampColumn); _tableDefinitionWithoutPrimaryKeyConstraint = TableDefinitionObjectMother.Create( SchemaGenerationFirstStorageProviderDefinition, new EntityNameDefinition("SchemaName", "EntityName"), null, objectIDProperty, timestampProperty, property1); _tableDefinitionWithClusteredPrimaryKeyConstraint = TableDefinitionObjectMother.Create( SchemaGenerationFirstStorageProviderDefinition, new EntityNameDefinition("SchemaName", "EntityName"), null, objectIDProperty, timestampProperty, new[] { property1, property2 }, new ITableConstraintDefinition[] { new PrimaryKeyConstraintDefinition("PKName", true, new[] { column1 }) }); _tableDefinitionWithNonClusteredPrimaryKeyConstraint = TableDefinitionObjectMother.Create( SchemaGenerationFirstStorageProviderDefinition, new EntityNameDefinition(null, "EntityName"), null, objectIDProperty, timestampProperty, new[] { property1, property2 }, new ITableConstraintDefinition[] { new PrimaryKeyConstraintDefinition("PKName", false, new[] { column1, column2 }) }); }
public static UnionViewDefinition Create( StorageProviderDefinition storageProviderDefinition, EntityNameDefinition viewName, IEnumerable <IRdbmsStorageEntityDefinition> unionedEntities, ObjectIDStoragePropertyDefinition objectIDProperty, SimpleStoragePropertyDefinition timestampProperty, params IRdbmsStoragePropertyDefinition[] dataProperties) { return(new UnionViewDefinition( storageProviderDefinition, viewName, unionedEntities, objectIDProperty, timestampProperty, dataProperties, new IIndexDefinition[0], new EntityNameDefinition[0])); }
public void SetUp() { _storageProviderDefinition = new UnitTestStorageProviderStubDefinition("SPID"); _timestampProperty = SimpleStoragePropertyDefinitionObjectMother.TimestampProperty; _objectIDProperty = ObjectIDStoragePropertyDefinitionObjectMother.ObjectIDProperty; _property1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column1"); _property2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column2"); _property3 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Column3"); _synonyms = new[] { new EntityNameDefinition("Schema", "Test") }; _emptyViewDefinition = new EmptyViewDefinition( _storageProviderDefinition, new EntityNameDefinition("Schema", "Test"), _objectIDProperty, _timestampProperty, new[] { _property1, _property2, _property3 }, _synonyms); }
public static TableDefinition Create( StorageProviderDefinition storageProviderDefinition, EntityNameDefinition tableName, EntityNameDefinition viewName, ObjectIDStoragePropertyDefinition objectIDPropertyDefinition, SimpleStoragePropertyDefinition timestampPropertyDefinition, IEnumerable <IRdbmsStoragePropertyDefinition> dataPropertyDefinitions, IEnumerable <ITableConstraintDefinition> tableConstraintDefinitions) { return(new TableDefinition( storageProviderDefinition, tableName, viewName, objectIDPropertyDefinition, timestampPropertyDefinition, dataPropertyDefinitions, tableConstraintDefinitions, new IIndexDefinition[0], new EntityNameDefinition[0])); }
public static FilterViewDefinition Create( StorageProviderDefinition storageProviderDefinition, EntityNameDefinition viewName, IRdbmsStorageEntityDefinition baseEntity, IEnumerable <string> classIDs, ObjectIDStoragePropertyDefinition objectIDProperty, SimpleStoragePropertyDefinition timestampProperty, IEnumerable <IRdbmsStoragePropertyDefinition> dataProperties) { return(new FilterViewDefinition( storageProviderDefinition, viewName, baseEntity, classIDs, objectIDProperty, timestampProperty, dataProperties, new IIndexDefinition[0], new EntityNameDefinition[0])); }
public void UnifyWithEquivalentProperties_CombinesPropertiesAndColumns() { var isPartOfPrimaryKey = BooleanObjectMother.GetRandomBoolean(); var property1 = new SimpleStoragePropertyDefinition( typeof(int), ColumnDefinitionObjectMother.CreateColumn("Col", CreateDefinedStorageTypeInformation(false), isPartOfPrimaryKey)); var property2 = new SimpleStoragePropertyDefinition( typeof(int), ColumnDefinitionObjectMother.CreateColumn("Col", CreateDefinedStorageTypeInformation(false), isPartOfPrimaryKey)); var property3 = new SimpleStoragePropertyDefinition( typeof(int), ColumnDefinitionObjectMother.CreateColumn("Col", CreateDefinedStorageTypeInformation(true), isPartOfPrimaryKey)); var result = property1.UnifyWithEquivalentProperties(new[] { property2, property3 }); Assert.That(result, Is.TypeOf <SimpleStoragePropertyDefinition> ().With.Property("PropertyType").SameAs(typeof(int))); Assert.That(((SimpleStoragePropertyDefinition)result).ColumnDefinition.Name, Is.EqualTo("Col")); Assert.That(((SimpleStoragePropertyDefinition)result).ColumnDefinition.StorageTypeInfo.IsStorageTypeNullable, Is.True); Assert.That(((SimpleStoragePropertyDefinition)result).ColumnDefinition.IsPartOfPrimaryKey, Is.EqualTo(isPartOfPrimaryKey)); }
public override void SetUp() { base.SetUp(); _storageProviderDefinitionFinder = new StorageGroupBasedStorageProviderDefinitionFinder(DomainObjectsConfiguration.Current.Storage); _storageProviderDefinition = (RdbmsProviderDefinition)_storageProviderDefinitionFinder.GetStorageProviderDefinition( storageGroupTypeOrNull: null, errorMessageContext: "SetUp"); var factory = _storageProviderDefinition.Factory; _rdbmsPersistenceModelLoader = (RdbmsPersistenceModelLoader)factory.CreatePersistenceModelLoader(_storageProviderDefinition, _storageProviderDefinitionFinder); _testModel = new RdbmsPersistenceModelLoaderTestHelper(); var infrastructureStoragePropertyDefinitionProvider = ((RdbmsStorageEntityDefinitionFactory)_rdbmsPersistenceModelLoader.EntityDefinitionFactory).InfrastructureStoragePropertyDefinitionProvider; _infrastructureObjectIDStoragePropertyDefinition = infrastructureStoragePropertyDefinitionProvider.GetObjectIDStoragePropertyDefinition(); _infrastructureIDStoragePropertyDefinition = (SimpleStoragePropertyDefinition)_infrastructureObjectIDStoragePropertyDefinition.ValueProperty; _infrastructureClassIDStoragePropertyDefinition = (SimpleStoragePropertyDefinition)_infrastructureObjectIDStoragePropertyDefinition.ClassIDProperty; _infrastructureTimestampStoragePropertyDefinition = (SimpleStoragePropertyDefinition)infrastructureStoragePropertyDefinitionProvider.GetTimestampStoragePropertyDefinition(); _fakeBaseBaseStoragePropertyDefinition = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("BaseBaseProperty"); _fakeBaseStoragePropertyDefinition = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("BaseProperty"); _fakeTableStoragePropertyDefinition1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("TableProperty1"); _fakeTableStoragePropertyDefinition2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("TableProperty2"); _fakeDerivedStoragePropertyDefinition1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("DerivedProperty1"); _fakeDerivedStoragePropertyDefinition2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("DerivedProperty2"); _fakeDerivedDerivedStoragePropertyDefinition = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("DerivedDerivedProperty"); _testModel.BaseBasePropertyDefinition.SetStorageProperty(_fakeBaseBaseStoragePropertyDefinition); _testModel.BasePropertyDefinition.SetStorageProperty(_fakeBaseStoragePropertyDefinition); _testModel.TablePropertyDefinition1.SetStorageProperty(_fakeTableStoragePropertyDefinition1); _testModel.TablePropertyDefinition2.SetStorageProperty(_fakeTableStoragePropertyDefinition2); _testModel.DerivedPropertyDefinition1.SetStorageProperty(_fakeDerivedStoragePropertyDefinition1); _testModel.DerivedPropertyDefinition2.SetStorageProperty(_fakeDerivedStoragePropertyDefinition2); _testModel.DerivedDerivedPropertyDefinition.SetStorageProperty(_fakeDerivedDerivedStoragePropertyDefinition); }
public void SetUp() { _persistenceModelProviderStub = MockRepository.GenerateStub <IRdbmsPersistenceModelProvider>(); _resolver = new StoragePropertyDefinitionResolver(_persistenceModelProviderStub); _testModel = new RdbmsPersistenceModelLoaderTestHelper(); _fakeStorageProperyDefinition1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test1"); _fakeStorageProperyDefinition2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test2"); _fakeStorageProperyDefinition3 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test3"); _fakeStorageProperyDefinition4 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test4"); _fakeStorageProperyDefinition5 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test5"); _fakeStorageProperyDefinition6 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test6"); _fakeStorageProperyDefinition7 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test7"); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.BaseBasePropertyDefinition)) .Return(_fakeStorageProperyDefinition1); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.BaseBasePropertyDefinition)) .Return(_fakeStorageProperyDefinition1); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.BasePropertyDefinition)) .Return(_fakeStorageProperyDefinition2); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.TablePropertyDefinition1)) .Return(_fakeStorageProperyDefinition3); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.TablePropertyDefinition2)) .Return(_fakeStorageProperyDefinition4); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.DerivedPropertyDefinition1)) .Return(_fakeStorageProperyDefinition5); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.DerivedPropertyDefinition2)) .Return(_fakeStorageProperyDefinition6); _persistenceModelProviderStub .Stub(stub => stub.GetStoragePropertyDefinition(_testModel.DerivedDerivedPropertyDefinition)) .Return(_fakeStorageProperyDefinition7); }
public void SetUp() { _storageProviderID = "DefaultStorageProvider"; _storageProviderDefinition = new UnitTestStorageProviderStubDefinition(_storageProviderID); _testModel = new RdbmsPersistenceModelLoaderTestHelper(); _entityDefinitionFactoryMock = MockRepository.GenerateStrictMock <IRdbmsStorageEntityDefinitionFactory>(); _dataStoragePropertyDefinitionFactoryMock = MockRepository.GenerateStrictMock <IDataStoragePropertyDefinitionFactory>(); _storageNameProviderStub = MockRepository.GenerateStub <IStorageNameProvider>(); _storageNameProviderStub.Stub(stub => stub.GetTableName(_testModel.TableClassDefinition1)).Return( new EntityNameDefinition(null, _testModel.TableClassDefinition1.ID)); _storageNameProviderStub.Stub(stub => stub.GetTableName(_testModel.TableClassDefinition2)).Return( new EntityNameDefinition(null, _testModel.TableClassDefinition2.ID)); _rdbmsPersistenceModelLoader = new RdbmsPersistenceModelLoader( _entityDefinitionFactoryMock, _dataStoragePropertyDefinitionFactoryMock, _storageNameProviderStub, new RdbmsPersistenceModelProvider()); _fakeEntityDefinitionBaseBase = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeEntityDefinitionBase = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeEntityDefinitionTable1 = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeEntityDefinitionTable2 = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeEntityDefinitionDerived1 = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeEntityDefinitionDerived2 = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeEntityDefinitionDerivedDerived = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeEntityDefinitionDerivedDerivedDerived = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _fakeColumnDefinition1 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test1"); _fakeColumnDefinition2 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test2"); _fakeColumnDefinition3 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test3"); _fakeColumnDefinition4 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test4"); _fakeColumnDefinition5 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test5"); _fakeColumnDefinition6 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test6"); _fakeColumnDefinition7 = SimpleStoragePropertyDefinitionObjectMother.CreateStorageProperty("Test7"); }
public override void SetUp() { base.SetUp(); _rdbmsPersistenceModelProviderStub = MockRepository.GenerateStub <IRdbmsPersistenceModelProvider>(); _entityDefinitionStub = MockRepository.GenerateStub <IRdbmsStorageEntityDefinition>(); _storageTypeInformationProviderStub = MockRepository.GenerateStub <IStorageTypeInformationProvider>(); _dataContainerValidatorStub = MockRepository.GenerateStub <IDataContainerValidator>(); _objectIDProperty = ObjectIDStoragePropertyDefinitionObjectMother.ObjectIDProperty; _timestampProperty = SimpleStoragePropertyDefinitionObjectMother.TimestampProperty; _entityDefinitionStub.Stub(stub => stub.ObjectIDProperty).Return(_objectIDProperty); _entityDefinitionStub.Stub(stub => stub.TimestampProperty).Return(_timestampProperty); _column1 = ColumnDefinitionObjectMother.CreateColumn("Column1"); _column2 = ColumnDefinitionObjectMother.CreateColumn("Column2"); _infrastructureStoragePropertyDefinitionProviderStub = MockRepository.GenerateStrictMock <IInfrastructureStoragePropertyDefinitionProvider> (); _factory = new ObjectReaderFactory( _rdbmsPersistenceModelProviderStub, _infrastructureStoragePropertyDefinitionProviderStub, _storageTypeInformationProviderStub, _dataContainerValidatorStub); }