@Test public void repaintTest() { DummyMapView dummyMapView = new DummyMapView(); Model model = new Model(); MapViewController.create(dummyMapView, model); Assert.assertEquals(0, dummyMapView.repaintCounter); model.mapViewPosition.setZoomLevel((byte) 1); }
public static MapViewController create(MapView mapView, Model model) { MapViewController mapViewController = new MapViewController(mapView); model.mapViewPosition.addObserver(mapViewController); return mapViewController; }
MapViewController implements Observer { public static MapViewController create(MapView mapView, Model model) { MapViewController mapViewController = new MapViewController(mapView); model.mapViewPosition.addObserver(mapViewController); return mapViewController; } }
MapViewController implements Observer { public static MapViewController create(MapView mapView, Model model) { MapViewController mapViewController = new MapViewController(mapView); model.mapViewPosition.addObserver(mapViewController); return mapViewController; } private  MapViewController(MapView mapView); }
MapViewController implements Observer { public static MapViewController create(MapView mapView, Model model) { MapViewController mapViewController = new MapViewController(mapView); model.mapViewPosition.addObserver(mapViewController); return mapViewController; } private  MapViewController(MapView mapView); static MapViewController create(MapView mapView, Model model); @Override void onChange(); }
MapViewController implements Observer { public static MapViewController create(MapView mapView, Model model) { MapViewController mapViewController = new MapViewController(mapView); model.mapViewPosition.addObserver(mapViewController); return mapViewController; } private  MapViewController(MapView mapView); static MapViewController create(MapView mapView, Model model); @Override void onChange();  }