public List <DatabaseUnusedIndexes> GetDatabaseUnusedIndexes(
            [PexAssumeUnderTest] DatabaseSchemaAccessLayer target,
            string database
            )
        {
            List <DatabaseUnusedIndexes> result = target.GetDatabaseUnusedIndexes(database);

            return(result);
            // TODO: add assertions to method DatabaseSchemaAccessLayerTest.GetDatabaseUnusedIndexes(DatabaseSchemaAccessLayer, String)
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the database unused indexes.
        /// </summary>
        private void GetDatabaseUnusedIndexes()
        {
            DatabaseSchemaAccessLayer databaseInfo = new DatabaseSchemaAccessLayer(this.ConnectionParams);

            List <DatabaseUnusedIndexes> unusedIndexes = databaseInfo.GetDatabaseUnusedIndexes(this.DatabaseName);
            int count = unusedIndexes.Count;

            if (unusedIndexes.Count > 0)
            {
                this.DataGridViewSchema.DataSource = unusedIndexes;
                int dataGridViewWidth = this.DataGridViewSchema.Width;

                this.DataGridViewSchema.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                this.DataGridViewSchema.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
                this.DataGridViewSchema.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft;
            }
        }