forked from upstream-mirrors/OpenTracks
Cleanup/Java 17: use multi-line text blocks.
This commit is contained in:
+11
-9
@@ -27,15 +27,17 @@ public class KmlTrackExporterTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void writeCloseSegment_only_write_sensordata_if_present() {
|
public void writeCloseSegment_only_write_sensordata_if_present() {
|
||||||
String expected = "<when>1970-01-01T00:00:00Z</when>\n" +
|
String expected = """
|
||||||
"<coord/>\n" +
|
<when>1970-01-01T00:00:00Z</when>
|
||||||
"<when>1970-01-01T01:00:00+01:00</when>\n" +
|
<coord/>
|
||||||
"<coord/>\n" +
|
<when>1970-01-01T01:00:00+01:00</when>
|
||||||
"<ExtendedData>\n" +
|
<coord/>
|
||||||
"<SchemaData schemaUrl=\"#schema\">\n" +
|
<ExtendedData>
|
||||||
"</SchemaData>\n" +
|
<SchemaData schemaUrl="#schema">
|
||||||
"</ExtendedData>\n" +
|
</SchemaData>
|
||||||
"</Track>\n";
|
</ExtendedData>
|
||||||
|
</Track>
|
||||||
|
""";
|
||||||
|
|
||||||
// given
|
// given
|
||||||
TrackPoint trackPoint = new TrackPoint(TrackPoint.Type.SEGMENT_START_MANUAL, Instant.ofEpochSecond(0));
|
TrackPoint trackPoint = new TrackPoint(TrackPoint.Type.SEGMENT_START_MANUAL, Instant.ofEpochSecond(0));
|
||||||
|
|||||||
@@ -34,23 +34,24 @@ public class EGM2008UtilsTest {
|
|||||||
int expectedLength = 18671444;
|
int expectedLength = 18671444;
|
||||||
int expectedHeaderLength = 404;
|
int expectedHeaderLength = 404;
|
||||||
|
|
||||||
String expectedHeader = "P5\n" +
|
String expectedHeader = """
|
||||||
"# Geoid file in PGM format for the GeographicLib::Geoid class\n" +
|
P5
|
||||||
"# Description WGS84 EGM2008, 5-minute grid\n" +
|
# Geoid file in PGM format for the GeographicLib::Geoid class
|
||||||
"# URL http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008\n" +
|
# Description WGS84 EGM2008, 5-minute grid
|
||||||
"# DateTime 2009-08-29 18:45:00\n" +
|
# URL http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008
|
||||||
"# MaxBilinearError 0.478\n" +
|
# DateTime 2009-08-29 18:45:00
|
||||||
"# RMSBilinearError 0.012\n" +
|
# MaxBilinearError 0.478
|
||||||
"# MaxCubicError 0.294\n" +
|
# RMSBilinearError 0.012
|
||||||
"# RMSCubicError 0.005\n" +
|
# MaxCubicError 0.294
|
||||||
"# Offset -108\n" +
|
# RMSCubicError 0.005
|
||||||
"# Scale 0.003\n" +
|
# Offset -108
|
||||||
"# Origin 90N 0E\n" +
|
# Scale 0.003
|
||||||
"# AREA_OR_POINT Point\n" +
|
# Origin 90N 0E
|
||||||
"# Vertical_Datum WGS84\n" +
|
# AREA_OR_POINT Point
|
||||||
"4320 2161\n" +
|
# Vertical_Datum WGS84
|
||||||
"65535" +
|
4320 2161
|
||||||
"\n";
|
65535
|
||||||
|
""";
|
||||||
|
|
||||||
// when
|
// when
|
||||||
try (InputStream inputStream = context.getResources().openRawResource(EGM2008Utils.EGM2008_5_DATA)) {
|
try (InputStream inputStream = context.getResources().openRawResource(EGM2008Utils.EGM2008_5_DATA)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user