@Test public void performEdit() { SimpleJdbcDataSourcePlugin simpleJdbcDataSourcePlugin = spy( new SimpleJdbcDataSourcePlugin() ); SimpleJdbcDataSourceDialog editor = mock( SimpleJdbcDataSourceDialog.class ); doReturn( editor ).when( simpleJdbcDataSourcePlugin ).createEditor( any( DesignTimeContext.class ) ); DesignTimeContext designTimeContext = mock( DesignTimeContext.class ); when( designTimeContext.getParentWindow() ).thenReturn( mock( Window.class ) ); DataFactory input = mock( SimpleSQLReportDataFactory.class ); DataFactoryChangeRecorder changeRecorder = mock( DataFactoryChangeRecorder.class ); simpleJdbcDataSourcePlugin.performEdit( designTimeContext, input, "TEST_QUERY_NAME", changeRecorder ); verify( editor, times( 1 ) ).performConfiguration( any( SimpleSQLReportDataFactory.class ) ); }
public DataFactory performEdit( final DesignTimeContext context, final DataFactory input, final String queryName, final DataFactoryChangeRecorder changeRecorder ) { final SimpleJdbcDataSourceDialog editor = createEditor( context ); return editor.performConfiguration( (SimpleSQLReportDataFactory) input ); }
SimpleJdbcDataSourcePlugin implements DataSourcePlugin { public DataFactory performEdit( final DesignTimeContext context, final DataFactory input, final String queryName, final DataFactoryChangeRecorder changeRecorder ) { final SimpleJdbcDataSourceDialog editor = createEditor( context ); return editor.performConfiguration( (SimpleSQLReportDataFactory) input ); } }
SimpleJdbcDataSourcePlugin implements DataSourcePlugin { public DataFactory performEdit( final DesignTimeContext context, final DataFactory input, final String queryName, final DataFactoryChangeRecorder changeRecorder ) { final SimpleJdbcDataSourceDialog editor = createEditor( context ); return editor.performConfiguration( (SimpleSQLReportDataFactory) input ); } SimpleJdbcDataSourcePlugin(); }
SimpleJdbcDataSourcePlugin implements DataSourcePlugin { public DataFactory performEdit( final DesignTimeContext context, final DataFactory input, final String queryName, final DataFactoryChangeRecorder changeRecorder ) { final SimpleJdbcDataSourceDialog editor = createEditor( context ); return editor.performConfiguration( (SimpleSQLReportDataFactory) input ); } SimpleJdbcDataSourcePlugin(); DataFactoryMetaData getMetaData(); boolean canHandle( final DataFactory dataFactory ); DataFactory performEdit( final DesignTimeContext context, final DataFactory input, final String queryName,
      final DataFactoryChangeRecorder changeRecorder ); JComponent getPropertyPanel( final DataFactory dataFactory, final DesignTimeContext context ); }
SimpleJdbcDataSourcePlugin implements DataSourcePlugin { public DataFactory performEdit( final DesignTimeContext context, final DataFactory input, final String queryName, final DataFactoryChangeRecorder changeRecorder ) { final SimpleJdbcDataSourceDialog editor = createEditor( context ); return editor.performConfiguration( (SimpleSQLReportDataFactory) input ); } SimpleJdbcDataSourcePlugin(); DataFactoryMetaData getMetaData(); boolean canHandle( final DataFactory dataFactory ); DataFactory performEdit( final DesignTimeContext context, final DataFactory input, final String queryName,
      final DataFactoryChangeRecorder changeRecorder ); JComponent getPropertyPanel( final DataFactory dataFactory, final DesignTimeContext context );  }