public override void SetUp() { base.SetUp(); _factory = new SqlIndexDefinitionScriptElementFactory(); _column1 = new SqlIndexedColumnDefinition(ColumnDefinitionObjectMother.CreateColumn("IndexColumn1"), IndexOrder.Desc); _column2 = new SqlIndexedColumnDefinition(ColumnDefinitionObjectMother.CreateColumn("IndexColumn2"), IndexOrder.Asc); _includedColumn1 = ColumnDefinitionObjectMother.CreateColumn("IncludedColumn1"); _includedColumn2 = ColumnDefinitionObjectMother.CreateColumn("IncludedColumn2"); _customSchemaNameDefinition = new EntityNameDefinition("SchemaName", "TableName1"); _indexDefinitionWithCustomSchema = new SqlIndexDefinition("Index1", new[] { _column1 }); _defaultSchemaNameDefinition = new EntityNameDefinition(null, "TableName2"); _indexDefinitionWithDefaultSchema = new SqlIndexDefinition("Index2", new[] { _column2 }); }
public override void SetUp() { base.SetUp(); _indexDefinitionElementFactoryMock = MockRepository.GenerateStub <ISqlIndexDefinitionScriptElementFactory <SqlIndexDefinition> >(); _primaryIndexDefinitionElementFactoryMock = MockRepository.GenerateStub <ISqlIndexDefinitionScriptElementFactory <SqlPrimaryXmlIndexDefinition> > (); _secondaryIndexDefinitionElementFactoryMock = MockRepository.GenerateStub <ISqlIndexDefinitionScriptElementFactory <SqlSecondaryXmlIndexDefinition> >(); _factory = new SqlIndexScriptElementFactory( _indexDefinitionElementFactoryMock, _primaryIndexDefinitionElementFactoryMock, _secondaryIndexDefinitionElementFactoryMock); var simpleColumn = ColumnDefinitionObjectMother.CreateColumn("Column"); var indexedColumn = new SqlIndexedColumnDefinition(simpleColumn, IndexOrder.Desc); _entityNameDefinition = new EntityNameDefinition(null, "Table"); _indexDefinition = new SqlIndexDefinition("Index1", new[] { indexedColumn }); _primaryIndexDefinition = new SqlPrimaryXmlIndexDefinition("Index2", simpleColumn); _secondaryIndexDefinition = new SqlSecondaryXmlIndexDefinition( "Index3", simpleColumn, "PrimaryIndexName", SqlSecondaryXmlIndexKind.Property); _fakeScriptElement = MockRepository.GenerateStub <IScriptElement>(); }
public void Initialization_WithNullIndexOrder() { var indexedColumn = new SqlIndexedColumnDefinition(_innerColumn); Assert.That(indexedColumn.IndexOrder, Is.Null); }
public void SetUp() { _innerColumn = ColumnDefinitionObjectMother.CreateColumn("InnerColumn"); _indexedColumn = new SqlIndexedColumnDefinition(_innerColumn, IndexOrder.Desc); }