Revert the change to make the method getMyTracksLocation static (I'll create a new change for it). And change comments which have Javadoc warnings in some classes.

This commit is contained in:
youtaol
2012-03-02 17:41:12 +08:00
parent b525a26917
commit 48f9380f21
3 changed files with 25 additions and 25 deletions
@@ -43,13 +43,13 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
private View zoomOut;
private int currentZoomLevel;
private static final String LOCATION_PROVIDER = "gps";
private static final double INITIAL_LONGTITUDE = 22;
private static final double INITIAL_LATITUDE = 22;
private static final double INITIAL_ALTITUDE = 22;
private static final float INITIAL_ACCURACY = 5;
private static final float INITIAL_SPEED = 10;
private static final float INITIAL_BEARING = 3.0f;
private final String LOCATION_PROVIDER = "gps";
private final double INITIAL_LONGTITUDE = 22;
private final double INITIAL_LATITUDE = 22;
private final double INITIAL_ALTITUDE = 22;
private final float INITIAL_ACCURACY = 5;
private final float INITIAL_SPEED = 10;
private final float INITIAL_BEARING = 3.0f;
// 10 is same with the default value in ChartView
private final int MAX_ZOOM_LEVEL = 10;
private final int MIN_ZOOM_LEVEL = 1;
@@ -113,7 +113,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
/**
* There are two parts in this test. Tests
* {@link ChartActivity#OnCreateDialog()} which includes the logic to create
* {@link ChartActivity#onCreateDialog(int)} which includes the logic to create
* {@link ChartSettingsDialog}.
*/
public void testCreateSettingDialog() {
@@ -134,7 +134,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
/**
* Tests the logic to get the incorrect values of sensor in {@link
* ChartActivity#fillDataPoint(Location location, double result[])}.
* ChartActivity#fillDataPoint(Location, double[])}.
*/
public void testFillDataPoint_sensorIncorrect() {
MyTracksLocation myTracksLocation = getMyTracksLocation();
@@ -166,7 +166,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
/**
* Tests the logic to get the correct values of sensor in {@link
* ChartActivity#fillDataPoint(Location location, double result[])}.
* ChartActivity#fillDataPoint(Location, double[])}.
*/
public void testFillDataPoint_sensorCorrect() {
MyTracksLocation myTracksLocation = getMyTracksLocation();
@@ -197,7 +197,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
/**
* Tests the logic to get the value of metric Distance in
* {@link #fillDataPoint}.
* {@link ChartActivity#fillDataPoint(Location, double[])}.
*/
public void testFillDataPoint_distanceMetric() {
// By distance.
@@ -214,7 +214,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
// The third location is a new location, and use metric.
MyTracksLocation myTracksLocation3 = getMyTracksLocation();
myTracksLocation3.setLatitude(INITIAL_LONGTITUDE + 1 );
myTracksLocation3.setLatitude(23);
point = fillDataPointTestHelper(myTracksLocation3, false);
// Computes the distance between Latitude 22 and 23.
float[] results = new float[4];
@@ -225,7 +225,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
// The fourth location is a new location, and use metric.
MyTracksLocation myTracksLocation4 = getMyTracksLocation();
myTracksLocation4.setLatitude(INITIAL_LONGTITUDE + 2 );
myTracksLocation4.setLatitude(24);
point = fillDataPointTestHelper(myTracksLocation4, false);
// Computes the distance between Latitude 23 and 24.
@@ -237,7 +237,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
/**
* Tests the logic to get the value of imperial Distance in
* {@link #fillDataPoint}.
* {@link ChartActivity#fillDataPoint(Location, double[])}.
*/
public void testFillDataPoint_distanceImperial() {
// Setups to use imperial.
@@ -250,7 +250,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
// The second location is a new location, and use imperial.
MyTracksLocation myTracksLocation2 = getMyTracksLocation();
myTracksLocation2.setLatitude(INITIAL_LONGTITUDE + 1 );
myTracksLocation2.setLatitude(23);
point = fillDataPointTestHelper(myTracksLocation2, false);
/*
* Computes the distance between Latitude 22 and 23. And for we set using
@@ -264,7 +264,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
// The third location is a new location, and use imperial.
MyTracksLocation myTracksLocation3 = getMyTracksLocation();
myTracksLocation3.setLatitude(INITIAL_LONGTITUDE + 2 );
myTracksLocation3.setLatitude(24);
point = fillDataPointTestHelper(myTracksLocation3, false);
/*
* Computes the distance between Latitude 23 and 24. And for we set using
@@ -278,7 +278,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
}
/**
* Tests the logic to get the values of time in {@link #fillDataPoint}.
* Tests the logic to get the values of time in {@link ChartActivity#fillDataPoint(Location, double[])}.
*/
public void testFillDataPoint_time() {
// By time
@@ -390,7 +390,7 @@ public class ChartActivityTest extends ActivityInstrumentationTestCase2<ChartAct
*
* @return a simulated location.
*/
public static MyTracksLocation getMyTracksLocation() {
private MyTracksLocation getMyTracksLocation() {
// Initial Location
Location loc = new Location(LOCATION_PROVIDER);
loc.setLongitude(INITIAL_LONGTITUDE);
@@ -245,7 +245,7 @@ public class SendRequestTest extends AndroidTestCase {
}
/**
* Tests {@link SendRequest#writeToParcel(Parcel in)} when all input values
* Tests {@link SendRequest#writeToParcel(Parcel, int)} when all input values
* are true or affirmative.
*/
public void testWriteToParcel_allTrue() {
@@ -283,7 +283,7 @@ public class SendRequestTest extends AndroidTestCase {
}
/**
* Tests {@link SendRequest#writeToParcel(Parcel in)} when all input values
* Tests {@link SendRequest#writeToParcel(Parcel, int)} when all input values
* are false or negative.
*/
public void testWriteToParcel_allFalse() {
@@ -51,7 +51,7 @@ public class UploadServiceChooserActivityTest extends
/**
* Tests the logic to control display all send options. This test cover code
* in method {@link UploadServiceChooserActivity#onCreateDialog()},
* in method {@link UploadServiceChooserActivity#onCreateDialog(int)},
* {@link UploadServiceChooserActivity#updateStateBySendRequest()} and
* {@link UploadServiceChooserActivity#updateStateBySelection()}.
*/
@@ -91,7 +91,7 @@ public class UploadServiceChooserActivityTest extends
/**
* Tests the logic to check the send to Google Maps option. This test cover
* code in method {@link UploadServiceChooserActivity#onCreateDialog()},
* code in method {@link UploadServiceChooserActivity#onCreateDialog(int)},
* {@link UploadServiceChooserActivity#updateStateBySendRequest()} and
* {@link UploadServiceChooserActivity#updateStateBySelection()}.
*/
@@ -120,7 +120,7 @@ public class UploadServiceChooserActivityTest extends
/**
* Tests the logic to control display none. This test cover code in method
* {@link UploadServiceChooserActivity#onCreateDialog()},
* {@link UploadServiceChooserActivity#onCreateDialog(int)},
* {@link UploadServiceChooserActivity#updateStateBySendRequest()} and
* {@link UploadServiceChooserActivity#updateStateBySelection()}.
*/
@@ -135,7 +135,7 @@ public class UploadServiceChooserActivityTest extends
/**
* Tests the logic to initial state of check box to unchecked. This test cover
* code in method {@link UploadServiceChooserActivity#onCreateDialog()},
* code in method {@link UploadServiceChooserActivity#onCreateDialog(int)},
* {@link UploadServiceChooserActivity#initState()}.
*/
public void testOnCreateDialog_initStateUnchecked() {
@@ -162,7 +162,7 @@ public class UploadServiceChooserActivityTest extends
/**
* Tests the logic to initial state of check box to checked. This test cover
* code in method {@link UploadServiceChooserActivity#onCreateDialog()},
* code in method {@link UploadServiceChooserActivity#onCreateDialog(int)},
* {@link UploadServiceChooserActivity#initState()}.
*/
public void testOnCreateDialog_initStateChecked() {