@Test public void testOnLoadClassWithClassAndNotNullHandler() { when(view.getNewClassName()).thenReturn("NewClassName"); presenter.onLoadClass(); verify(mockLoadClassesHandler).onLoadClass("NewClassName"); }
@Override public void onLoadClass() { view.setNewClassHelpMessage( null ); String newClassName = DataModelerUtils.nullTrim( view.getNewClassName() ); if ( newClassName == null ) { view.setNewClassHelpMessage( Constants.INSTANCE.project_class_list_class_name_empty_message() ); } else if ( loadClassesHandler != null ) { loadClassesHandler.onLoadClass( newClassName ); } else { if ( classes == null ) { classes = new ArrayList<ClassRow>( ); } classes.add( new ClassRowImpl( newClassName ) ); setClasses( classes ); } }
ProjectClassList implements IsWidget,
                    ProjectClassListView.Presenter { @Override public void onLoadClass() { view.setNewClassHelpMessage( null ); String newClassName = DataModelerUtils.nullTrim( view.getNewClassName() ); if ( newClassName == null ) { view.setNewClassHelpMessage( Constants.INSTANCE.project_class_list_class_name_empty_message() ); } else if ( loadClassesHandler != null ) { loadClassesHandler.onLoadClass( newClassName ); } else { if ( classes == null ) { classes = new ArrayList<ClassRow>( ); } classes.add( new ClassRowImpl( newClassName ) ); setClasses( classes ); } } }
ProjectClassList implements IsWidget,
                    ProjectClassListView.Presenter { @Override public void onLoadClass() { view.setNewClassHelpMessage( null ); String newClassName = DataModelerUtils.nullTrim( view.getNewClassName() ); if ( newClassName == null ) { view.setNewClassHelpMessage( Constants.INSTANCE.project_class_list_class_name_empty_message() ); } else if ( loadClassesHandler != null ) { loadClassesHandler.onLoadClass( newClassName ); } else { if ( classes == null ) { classes = new ArrayList<ClassRow>( ); } classes.add( new ClassRowImpl( newClassName ) ); setClasses( classes ); } } ProjectClassList(); @Inject  ProjectClassList( ProjectClassListView view ); }
ProjectClassList implements IsWidget,
                    ProjectClassListView.Presenter { @Override public void onLoadClass() { view.setNewClassHelpMessage( null ); String newClassName = DataModelerUtils.nullTrim( view.getNewClassName() ); if ( newClassName == null ) { view.setNewClassHelpMessage( Constants.INSTANCE.project_class_list_class_name_empty_message() ); } else if ( loadClassesHandler != null ) { loadClassesHandler.onLoadClass( newClassName ); } else { if ( classes == null ) { classes = new ArrayList<ClassRow>( ); } classes.add( new ClassRowImpl( newClassName ) ); setClasses( classes ); } } ProjectClassList(); @Inject  ProjectClassList( ProjectClassListView view ); @Override Widget asWidget(); void setClasses( List<ClassRow> classes ); List<ClassRow> getClasses(); void setNewClassHelpMessage( String helpMessage ); void setNewClassName( String newClassName ); @Override void onLoadClasses(); @Override void onLoadClass(); @Override void onClassNameChange(); @Override void onRemoveClass( ClassRow classRow ); @Override void addLoadClassesHandler( ProjectClassListView.LoadClassesHandler loadClassesHandler ); void setReadOnly( boolean readOnly ); void redraw(); }
ProjectClassList implements IsWidget,
                    ProjectClassListView.Presenter { @Override public void onLoadClass() { view.setNewClassHelpMessage( null ); String newClassName = DataModelerUtils.nullTrim( view.getNewClassName() ); if ( newClassName == null ) { view.setNewClassHelpMessage( Constants.INSTANCE.project_class_list_class_name_empty_message() ); } else if ( loadClassesHandler != null ) { loadClassesHandler.onLoadClass( newClassName ); } else { if ( classes == null ) { classes = new ArrayList<ClassRow>( ); } classes.add( new ClassRowImpl( newClassName ) ); setClasses( classes ); } } ProjectClassList(); @Inject  ProjectClassList( ProjectClassListView view ); @Override Widget asWidget(); void setClasses( List<ClassRow> classes ); List<ClassRow> getClasses(); void setNewClassHelpMessage( String helpMessage ); void setNewClassName( String newClassName ); @Override void onLoadClasses(); @Override void onLoadClass(); @Override void onClassNameChange(); @Override void onRemoveClass( ClassRow classRow ); @Override void addLoadClassesHandler( ProjectClassListView.LoadClassesHandler loadClassesHandler ); void setReadOnly( boolean readOnly ); void redraw();  }