public void Should_be_able_to_get_a_list_of_tables_info()
        {
            var schemaReader = MockRepository.GenerateStub<ISchemaReader>();

            schemaReader.Expect(sr => sr.GetTables(_connectionstring)).Return(new List<Table>());

            var databaseSchemaExplorer = MockRepository.GenerateMock<IDatabaseSchemaExplorer>();
            databaseSchemaExplorer.Expect(de => de.GetTables(Arg<IConnectionstringArguments>.Is.Anything)).Return(new List<Table>().AsQueryable());

            _databaseSchemaExplorerController = new WebHost.Controllers.DatabaseSchemaExplorerController(_connectionstringArgumentsMapper, databaseSchemaExplorer);

            var result = _databaseSchemaExplorerController.Tables("SqlServer", "Provider", "DataSource", "DatabaseName", "Username", "Password");

            Assert.IsNotNull(result);
        }
        public void Should_be_able_to_get_a_table_info()
        {
            var schemaReader = MockRepository.GenerateStub<ISchemaReader>();

            const string tableName = "tableName";
            schemaReader.Expect(sr => sr.GetTable(_connectionstring, tableName)).Return(new Table(tableName));

            var databaseSchemaExplorer = MockRepository.GenerateMock<IDatabaseSchemaExplorer>();
            databaseSchemaExplorer.Expect(de => de.GetTable(Arg<IConnectionstringArguments>.Is.Anything, Arg<string>.Is.Anything)).Return(new Table("TableName"));

            _databaseSchemaExplorerController = new WebHost.Controllers.DatabaseSchemaExplorerController(_connectionstringArgumentsMapper, databaseSchemaExplorer);

            var table = _databaseSchemaExplorerController.Tables("SqlServer", "Provider", "DataSource", "DatabaseName", tableName, "Username", "Password");

            Assert.IsNotNull(table);
        }