@Test public void testActivate() { doCallRealMethod().when( hadoopVfsFileChooserDialog ).activate(); VfsFileChooserDialog vfsFileChooserDialog = mock( VfsFileChooserDialog.class ); Combo combo = mock( Combo.class ); Tree tree = mock( Tree.class ); VfsBrowser vfsBrowser = mock( VfsBrowser.class ); doNothing().when( combo ).setText( anyString() ); vfsFileChooserDialog.openFileCombo = combo; doNothing().when( tree ).removeAll(); vfsBrowser.fileSystemTree = tree; vfsFileChooserDialog.vfsBrowser = vfsBrowser; doCallRealMethod().when( vfsFileChooserDialog ).setRootFile( null ); doCallRealMethod().when( vfsFileChooserDialog ).setInitialFile( null ); hadoopVfsFileChooserDialog.vfsFileChooserDialog = vfsFileChooserDialog; NamedClusterWidgetImplExtend namedClusterWidgetImpl = mock( NamedClusterWidgetImplExtend.class ); Combo namedClusterCombo = mock( Combo.class ); when( namedClusterCombo.getSelectionIndex() ).thenReturn( SELECTED_INDEX ); doNothing().when( namedClusterCombo ).removeAll(); doNothing().when( namedClusterCombo ).setItems( any() ); doNothing().when( namedClusterCombo ).select( SELECTED_INDEX ); when( namedClusterWidgetImpl.getNameClusterCombo() ).thenReturn( namedClusterCombo ); when( namedClusterWidgetImpl.getNamedClusterNames() ).thenReturn( NAMED_CLUSTER_NAMES ); doCallRealMethod().when( namedClusterWidgetImpl ).initiate(); doNothing().when( namedClusterWidgetImpl ).setSelectedNamedCluster( anyString() ); when( hadoopVfsFileChooserDialog.getNamedClusterWidget() ).thenReturn( namedClusterWidgetImpl ); hadoopVfsFileChooserDialog.activate(); verify( namedClusterWidgetImpl, times( 1 ) ).initiate(); }
public void activate() { vfsFileChooserDialog.setRootFile( null ); vfsFileChooserDialog.setInitialFile( null ); vfsFileChooserDialog.openFileCombo.setText( "hdfs: vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll(); getNamedClusterWidget().initiate(); getNamedClusterWidget().setSelectedNamedCluster( namedCluster ); super.activate(); }
HadoopVfsFileChooserDialog extends CustomVfsUiPanel { public void activate() { vfsFileChooserDialog.setRootFile( null ); vfsFileChooserDialog.setInitialFile( null ); vfsFileChooserDialog.openFileCombo.setText( "hdfs: vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll(); getNamedClusterWidget().initiate(); getNamedClusterWidget().setSelectedNamedCluster( namedCluster ); super.activate(); } }
HadoopVfsFileChooserDialog extends CustomVfsUiPanel { public void activate() { vfsFileChooserDialog.setRootFile( null ); vfsFileChooserDialog.setInitialFile( null ); vfsFileChooserDialog.openFileCombo.setText( "hdfs: vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll(); getNamedClusterWidget().initiate(); getNamedClusterWidget().setSelectedNamedCluster( namedCluster ); super.activate(); } HadoopVfsFileChooserDialog( String schemeName, String displayName, VfsFileChooserDialog vfsFileChooserDialog,
                                     FileObject rootFile, FileObject initialFile,
                                     NamedClusterService namedClusterService,
                                     RuntimeTestActionService runtimeTestActionService, RuntimeTester runtimeTester ); }
HadoopVfsFileChooserDialog extends CustomVfsUiPanel { public void activate() { vfsFileChooserDialog.setRootFile( null ); vfsFileChooserDialog.setInitialFile( null ); vfsFileChooserDialog.openFileCombo.setText( "hdfs: vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll(); getNamedClusterWidget().initiate(); getNamedClusterWidget().setSelectedNamedCluster( namedCluster ); super.activate(); } HadoopVfsFileChooserDialog( String schemeName, String displayName, VfsFileChooserDialog vfsFileChooserDialog,
                                     FileObject rootFile, FileObject initialFile,
                                     NamedClusterService namedClusterService,
                                     RuntimeTestActionService runtimeTestActionService, RuntimeTester runtimeTester ); void initializeConnectionPanel( FileObject file ); VariableSpace getVariableSpace(); NamedClusterWidgetImpl getNamedClusterWidget(); void setNamedCluster( String namedCluster ); void activate(); void connect(); FileObject resolveFile( String fileUri ); FileObject resolveFile( String fileUri, FileSystemOptions opts ); }
HadoopVfsFileChooserDialog extends CustomVfsUiPanel { public void activate() { vfsFileChooserDialog.setRootFile( null ); vfsFileChooserDialog.setInitialFile( null ); vfsFileChooserDialog.openFileCombo.setText( "hdfs: vfsFileChooserDialog.vfsBrowser.fileSystemTree.removeAll(); getNamedClusterWidget().initiate(); getNamedClusterWidget().setSelectedNamedCluster( namedCluster ); super.activate(); } HadoopVfsFileChooserDialog( String schemeName, String displayName, VfsFileChooserDialog vfsFileChooserDialog,
                                     FileObject rootFile, FileObject initialFile,
                                     NamedClusterService namedClusterService,
                                     RuntimeTestActionService runtimeTestActionService, RuntimeTester runtimeTester ); void initializeConnectionPanel( FileObject file ); VariableSpace getVariableSpace(); NamedClusterWidgetImpl getNamedClusterWidget(); void setNamedCluster( String namedCluster ); void activate(); void connect(); FileObject resolveFile( String fileUri ); FileObject resolveFile( String fileUri, FileSystemOptions opts );  }