@Test public void testInitialize() { DatabaseSchemaExplorer.Settings settings = new DatabaseSchemaExplorer.Settings().dataSourceUuid( DATASOURCE_ID ); when( metadataService.getMetadata( settings.dataSourceUuid(), false, true ) ).thenReturn( metadata ); when( metadata.getSchemas() ).thenReturn( schemas ); when( translationService.getTranslation( DataSourceManagementConstants.DatabaseSchemaExplorerViewImpl_loadingDbSchemas ) ).thenReturn( LOADING_MESSAGE1 ); schemaExplorer.initialize( settings ); List<DatabaseSchemaRow> rows = new ArrayList<>( ); for ( SchemaMetadata schema : schemas ) { rows.add( new DatabaseSchemaRow( schema.getSchemaName() ) ); } assertEquals( rows, schemaExplorer.getItems() ); verify( view, times( 1 ) ).setDataProvider( any( AsyncDataProvider.class ) ); verify( view, times( 1 ) ).showBusyIndicator( LOADING_MESSAGE1 ); verify( view, times( 1 ) ).hideBusyIndicator(); verify( view, times( 2 ) ).redraw(); }
public void initialize( Settings settings ) { initialize( settings, null ); }
DatabaseSchemaExplorer implements DatabaseSchemaExplorerView.Presenter, IsElement { public void initialize( Settings settings ) { initialize( settings, null ); } }
DatabaseSchemaExplorer implements DatabaseSchemaExplorerView.Presenter, IsElement { public void initialize( Settings settings ) { initialize( settings, null ); } DatabaseSchemaExplorer( ); @Inject  DatabaseSchemaExplorer( DatabaseSchemaExplorerView view,
                                   Caller< DatabaseMetadataService > metadataService,
                                   TranslationService translationService ); }
DatabaseSchemaExplorer implements DatabaseSchemaExplorerView.Presenter, IsElement { public void initialize( Settings settings ) { initialize( settings, null ); } DatabaseSchemaExplorer( ); @Inject  DatabaseSchemaExplorer( DatabaseSchemaExplorerView view,
                                   Caller< DatabaseMetadataService > metadataService,
                                   TranslationService translationService ); @Override HTMLElement getElement( ); void initialize( Settings settings ); void initialize( Settings settings, InitializeCallback initializeCallback ); void addHandler( DatabaseSchemaExplorerView.Handler handler ); @Override void onOpen( DatabaseSchemaRow row ); boolean hasItems( ); }
DatabaseSchemaExplorer implements DatabaseSchemaExplorerView.Presenter, IsElement { public void initialize( Settings settings ) { initialize( settings, null ); } DatabaseSchemaExplorer( ); @Inject  DatabaseSchemaExplorer( DatabaseSchemaExplorerView view,
                                   Caller< DatabaseMetadataService > metadataService,
                                   TranslationService translationService ); @Override HTMLElement getElement( ); void initialize( Settings settings ); void initialize( Settings settings, InitializeCallback initializeCallback ); void addHandler( DatabaseSchemaExplorerView.Handler handler ); @Override void onOpen( DatabaseSchemaRow row ); boolean hasItems( );  }