@Test public void testOnSelect() { presenter.onSelect(BARCHART); assertEquals(presenter.getSelectedType(), BARCHART); verify(typeSelectedEvent).fire(any(DisplayerTypeSelectedEvent.class)); }
void onSelect(DisplayerType type) { selectedType = type; subtypeSelector.init(type, null); typeSelectedEvent.fire(new DisplayerTypeSelectedEvent(selectedType)); }
DisplayerTypeSelector implements IsWidget { void onSelect(DisplayerType type) { selectedType = type; subtypeSelector.init(type, null); typeSelectedEvent.fire(new DisplayerTypeSelectedEvent(selectedType)); } }
DisplayerTypeSelector implements IsWidget { void onSelect(DisplayerType type) { selectedType = type; subtypeSelector.init(type, null); typeSelectedEvent.fire(new DisplayerTypeSelectedEvent(selectedType)); } @Inject  DisplayerTypeSelector(View view,
                                 DisplayerSubtypeSelector subtypeSelector,
                                 Event<DisplayerTypeSelectedEvent> typeSelectedEvent); }
DisplayerTypeSelector implements IsWidget { void onSelect(DisplayerType type) { selectedType = type; subtypeSelector.init(type, null); typeSelectedEvent.fire(new DisplayerTypeSelectedEvent(selectedType)); } @Inject  DisplayerTypeSelector(View view,
                                 DisplayerSubtypeSelector subtypeSelector,
                                 Event<DisplayerTypeSelectedEvent> typeSelectedEvent); @Override Widget asWidget(); DisplayerType getSelectedType(); DisplayerSubType getSelectedSubType(); DisplayerSubtypeSelector getSubtypeSelector(); void init(DisplayerType selectedType, DisplayerSubType selectedSubtype); }
DisplayerTypeSelector implements IsWidget { void onSelect(DisplayerType type) { selectedType = type; subtypeSelector.init(type, null); typeSelectedEvent.fire(new DisplayerTypeSelectedEvent(selectedType)); } @Inject  DisplayerTypeSelector(View view,
                                 DisplayerSubtypeSelector subtypeSelector,
                                 Event<DisplayerTypeSelectedEvent> typeSelectedEvent); @Override Widget asWidget(); DisplayerType getSelectedType(); DisplayerSubType getSelectedSubType(); DisplayerSubtypeSelector getSubtypeSelector(); void init(DisplayerType selectedType, DisplayerSubType selectedSubtype);  }