Code example for ImageButton

Methods: performClick

0
		// Verify if the MapView has restored its state 
		assertEquals(differentPoint.getLatitudeE6(), this.mapView.getMapCenter().getLatitudeE6());
		assertEquals(differentPoint.getLongitudeE6(), this.mapView.getMapCenter().getLongitudeE6());
 
		// Reset the map view to initialCenterPoint clicking the my location button 
		this.positionButton.performClick();
 
		assertEquals(initialCenterPoint.getLatitudeE6(), this.mapView.getMapCenter().getLatitudeE6());
		assertEquals(initialCenterPoint.getLongitudeE6(), this.mapView.getMapCenter().getLongitudeE6());
 
		double currentLatitude = mActivity.getLocation().getLatitude();
		double currentLongitude = mActivity.getLocation().getLongitude();
 
		assertEquals(currentLatitude, initialCenterPoint.getLatitudeE6());
		assertEquals(currentLongitude, initialCenterPoint.getLongitudeE6());
	} 
 
	public void testLocationManagerState() 
	{ 
		LocationManager testLocMgr = (LocationManager) mActivity.getSystemService(Context.LOCATION_SERVICE);
		testLocMgr.addTestProvider("TestProvider", false, false, false, false, false, false, false,