merge heads

This commit is contained in:
Jimmy Shih
2011-10-28 09:52:24 -07:00
8 changed files with 43 additions and 23 deletions
+1 -1
View File
@@ -3,12 +3,12 @@
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="lib" path="libs/AndroidMockRuntime.jar"/>
<classpathentry kind="src" path=".apt_generated">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/MyTracks"/>
<classpathentry kind="lib" path="libs/AndroidMockGenerator.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
+4 -3
View File
@@ -1,6 +1,7 @@
<factorypath>
<factorypathentry kind="WKSPJAR" id="/MyTracksTest/libs/AndroidMockGenerator.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="ANDROID_SDK/platforms/android-13/android.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="ANDROID_SDK/add-ons/addon_google_apis_google_inc_13/libs/maps.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="MYTRACKS_BIN" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="ANDROID_SDK/platforms/android-14/android.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="ANDROID_SDK/add-ons/addon-google_apis-google_inc_-14/libs/maps.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="WKSPJAR" id="/MyTracksLib/bin/mytrackslib.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="MYTRACKS_BIN/classes" enabled="true" runInBatchMode="false"/>
</factorypath>
@@ -1,7 +1,7 @@
#Mon Nov 01 02:42:03 BRST 2010
#Tue Oct 25 14:08:44 PDT 2011
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.processorOptions/bin_dir=%PROJECT.DIR%/bin
org.eclipse.jdt.apt.processorOptions/logfile=%PROJECT.DIR%/annotations.log
org.eclipse.jdt.apt.processorOptions/bin_dir=%PROJECT.DIR%/bin/classes
org.eclipse.jdt.apt.processorOptions/logfile=%PROJECT.DIR%/AnnotationProcessor.log
org.eclipse.jdt.apt.reconcileEnabled=false
@@ -40,7 +40,8 @@ import junit.framework.TestCase;
*/
public class DocsHelper_AddTrackRowTest extends TestCase {
private static final long TIME = 1288721514000L;
private static final DateFormat DATE_FORMAT = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
private static class StringWritingDocsHelper extends DocsHelper {
String writtenSheetUri = null;
String writtenData = null;
@@ -52,18 +53,22 @@ public class DocsHelper_AddTrackRowTest extends TestCase {
writtenData = postText;
}
}
public void testAddTrackRow_imperial() throws Exception {
StringWritingDocsHelper docsHelper = new StringWritingDocsHelper();
StringWritingDocsHelper docsHelper = new StringWritingDocsHelper() {
@Override
protected String getDisplayDate(Context context, long time) {
return DATE_FORMAT.format(new Date(TIME));
}
};
addTrackRow(docsHelper, false);
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
String expectedData =
"<entry xmlns='http://www.w3.org/2005/Atom' "
+ "xmlns:gsx='http://schemas.google.com/spreadsheets/2006/extended'>"
+ "<gsx:name><![CDATA[trackName]]></gsx:name>"
+ "<gsx:description><![CDATA[trackDescription]]></gsx:description>"
+ "<gsx:date><![CDATA[" + dateFormat.format(new Date(TIME)) + "]]></gsx:date>"
+ "<gsx:date><![CDATA[" + DATE_FORMAT.format(new Date(TIME)) + "]]></gsx:date>"
+ "<gsx:totaltime><![CDATA[0:00:05]]></gsx:totaltime>"
+ "<gsx:movingtime><![CDATA[0:00:04]]></gsx:movingtime>"
+ "<gsx:distance><![CDATA[12.43]]></gsx:distance>"
@@ -89,7 +94,12 @@ public class DocsHelper_AddTrackRowTest extends TestCase {
}
public void testAddTrackRow_metric() throws Exception {
StringWritingDocsHelper docsHelper = new StringWritingDocsHelper();
StringWritingDocsHelper docsHelper = new StringWritingDocsHelper() {
@Override
protected String getDisplayDate(Context context, long time) {
return DATE_FORMAT.format(new Date(TIME));
}
};
addTrackRow(docsHelper, true);
// The imperial test verifies that the tags come out in the proper order,