Be more explicit in testing the XML output of GpxTrackWriter.

Instead of producing the comparison strings in the tester just as they
are produced in the tested code, use string literals, thus actually
testing that the formatting code is working as expected.
This commit is contained in:
Jared Casper
2011-02-09 16:23:55 -08:00
parent 8135ad4424
commit 9c7fb25a94
2 changed files with 34 additions and 55 deletions
@@ -37,10 +37,10 @@ import java.util.TimeZone;
*/
public class GpxTrackWriter implements TrackFormatWriter {
static final int LATLONG_FORMAT = Location.FORMAT_DEGREES;
static final DecimalFormat ELEVATION_FORMATTER =
private static final int LATLONG_FORMAT = Location.FORMAT_DEGREES;
private static final DecimalFormat ELEVATION_FORMATTER =
new DecimalFormat("#.#");
static final SimpleDateFormat TIMESTAMP_FORMATTER =
private static final SimpleDateFormat TIMESTAMP_FORMATTER =
new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
static {
TIMESTAMP_FORMATTER.setTimeZone(TimeZone.getTimeZone("UTC"));