/*
 * Java Genetic Algorithm Library (@__identifier__@).
 * Copyright (c) @__year__@ Franz Wilhelmstötter
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Author:
 *    Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at)
 */
package org.jenetics.example.tsp;

import java.io.IOException;
import java.io.InputStream;

import org.testng.annotations.Test;

import org.jenetics.example.tsp.GPX.*;

/**
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @version !__version__!
 * @since !__version__!
 */
public class GPXTest {

	@Test
	public void writeGPX() throws IOException {
		final GPX gpx = new GPX();
		gpx.addWayPoint(GPX.Location.of(23, 34));
		gpx.addWayPoint(GPX.Location.of(24, 35));

		GPX.write(gpx, System.out);
	}

	@Test
	public void readGPX() throws IOException {
		final String resource = "/org/jenetics/example/tsp/gpx_way_points.gpx";
		try (InputStream in = getClass().getResourceAsStream(resource)) {
			final GPX gpx = GPX.read(GPX.class, in);
			GPX.write(gpx, System.out);
		}
	}

}

@@ -899,13 +899,61 @@
 tsp.
-GPX.*
+gpx.GPX;%0Aimport org.jenetics.example.tsp.gpx.WayPoint
 ;%0A%0A/
@@ -1115,16 +1115,20 @@
 Test %7B%0A%0A
+%09/*%0A
 %09@Test%0A%09
@@ -1214,36 +1214,32 @@
 addWayPoint(
-GPX.Location
+WayPoint
 .of(23, 34))
@@ -1262,20 +1262,16 @@
 int(
-GPX.Location
+WayPoint
 .of(
@@ -1427,18 +1427,13 @@
 gpx_
-way_points
+track
 .gpx
@@ -1535,19 +1535,8 @@
 ead(
-GPX.class, 
 in);
@@ -1571,14 +1571,18 @@
 t);%0A%09%09%7D%0A
-
 %09%7D
+%0A%09*/
 %0A%0A%7D%0A

Comment out test.