@Test public void onUnitsFetched_normalUnitList(){ capacityOverviewController.onUnitsFetched(mockEvent); verify(mockView).setUnits(setUnitsArgument.capture()); assertFalse(setUnitsArgument.getValue().isEmpty()); }
@Override public void onUnitsFetched(FetchUnitsEvent event) { units = new ArrayList<>(event.getUnits()); sortUnits(Unit.Properties.name, true); }
CapacityOverviewController extends Controller<CapacityOverviewView> implements FetchUnitsEvent.Handler { @Override public void onUnitsFetched(FetchUnitsEvent event) { units = new ArrayList<>(event.getUnits()); sortUnits(Unit.Properties.name, true); } }
CapacityOverviewController extends Controller<CapacityOverviewView> implements FetchUnitsEvent.Handler { @Override public void onUnitsFetched(FetchUnitsEvent event) { units = new ArrayList<>(event.getUnits()); sortUnits(Unit.Properties.name, true); } CapacityOverviewController(CapacityOverviewView view); }
CapacityOverviewController extends Controller<CapacityOverviewView> implements FetchUnitsEvent.Handler { @Override public void onUnitsFetched(FetchUnitsEvent event) { units = new ArrayList<>(event.getUnits()); sortUnits(Unit.Properties.name, true); } CapacityOverviewController(CapacityOverviewView view); void editCapacity(Unit unit); void sortUnits(Unit.Properties property, boolean ascending); @Override void onUnitsFetched(FetchUnitsEvent event); boolean unitUpdated(); @Override void onStop(); }
CapacityOverviewController extends Controller<CapacityOverviewView> implements FetchUnitsEvent.Handler { @Override public void onUnitsFetched(FetchUnitsEvent event) { units = new ArrayList<>(event.getUnits()); sortUnits(Unit.Properties.name, true); } CapacityOverviewController(CapacityOverviewView view); void editCapacity(Unit unit); void sortUnits(Unit.Properties property, boolean ascending); @Override void onUnitsFetched(FetchUnitsEvent event); boolean unitUpdated(); @Override void onStop();  }