Search in sources :

Example 6 with SchemaMetadata

use of org.kie.workbench.common.screens.datasource.management.metadata.SchemaMetadata in project kie-wb-common by kiegroup.

the class DatabaseObjectExplorerTest method setup.

@Before
public void setup() {
    objectExplorer = new DatabaseObjectExplorer(view, new CallerMock<>(metadataService), translationService);
    // emulate the @PostConstruct invocation.
    objectExplorer.init();
    schemas.add(new SchemaMetadata(SCHEMA_NAME));
    schemas.add(new SchemaMetadata("schema2"));
    schemas.add(new SchemaMetadata("schema3"));
    dbObjects.add(new TableMetadata(CATALOG_NAME, SCHEMA_NAME, "table1", DatabaseMetadata.TableType.TABLE.name()));
    dbObjects.add(new TableMetadata(CATALOG_NAME, SCHEMA_NAME, "table2", DatabaseMetadata.TableType.TABLE.name()));
}
Also used : TableMetadata(org.kie.workbench.common.screens.datasource.management.metadata.TableMetadata) SchemaMetadata(org.kie.workbench.common.screens.datasource.management.metadata.SchemaMetadata) CallerMock(org.uberfire.mocks.CallerMock) Before(org.junit.Before)

Aggregations

SchemaMetadata (org.kie.workbench.common.screens.datasource.management.metadata.SchemaMetadata)6 ArrayList (java.util.ArrayList)3 Before (org.junit.Before)3 CatalogMetadata (org.kie.workbench.common.screens.datasource.management.metadata.CatalogMetadata)2 DatabaseMetadata (org.kie.workbench.common.screens.datasource.management.metadata.DatabaseMetadata)2 CallerMock (org.uberfire.mocks.CallerMock)2 AsyncDataProvider (com.google.gwt.view.client.AsyncDataProvider)1 DatabaseMetaData (java.sql.DatabaseMetaData)1 ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1 Test (org.junit.Test)1 TableMetadata (org.kie.workbench.common.screens.datasource.management.metadata.TableMetadata)1 Pair (org.uberfire.commons.data.Pair)1