@Test public void checkInitializedBad() { thrown.expect(IllegalStateException.class); thrown.expectMessage("the view must be set before the presenter can be ran"); ToolkitPresenter presenter = new ToolkitPresenter(mock(ConfigurationModel.class), mock(SourceCodeModel.class)); presenter.checkInitialized(); }
void checkInitialized() { if (view == null) { throw new IllegalStateException("the view must be set before the presenter can be ran"); } }
ToolkitPresenter { void checkInitialized() { if (view == null) { throw new IllegalStateException("the view must be set before the presenter can be ran"); } } }
ToolkitPresenter { void checkInitialized() { if (view == null) { throw new IllegalStateException("the view must be set before the presenter can be ran"); } } ToolkitPresenter(ConfigurationModel configurationModel, SourceCodeModel model); }
ToolkitPresenter { void checkInitialized() { if (view == null) { throw new IllegalStateException("the view must be set before the presenter can be ran"); } } ToolkitPresenter(ConfigurationModel configurationModel, SourceCodeModel model); void setView(ToolkitView view); void run(String title); void onSourceCodeOpenButtonClick(); void onSourceCodeParseButtonClick(); void onXPathEvaluateButtonClick(); void onSourceCodeKeyTyped(); void onSourceCodeTextCursorMoved(); void onAstSelectionChanged(); void onConfigurationPropertyFocusLost(String name); }
ToolkitPresenter { void checkInitialized() { if (view == null) { throw new IllegalStateException("the view must be set before the presenter can be ran"); } } ToolkitPresenter(ConfigurationModel configurationModel, SourceCodeModel model); void setView(ToolkitView view); void run(String title); void onSourceCodeOpenButtonClick(); void onSourceCodeParseButtonClick(); void onXPathEvaluateButtonClick(); void onSourceCodeKeyTyped(); void onSourceCodeTextCursorMoved(); void onAstSelectionChanged(); void onConfigurationPropertyFocusLost(String name);  }