package au.gov.ga.geodesy.support.moxy;

import java.io.InputStreamReader;
import java.io.Reader;

import org.testng.annotations.Test;

import au.gov.xml.icsm.geodesyml.v_0_2_1.GeodesyMLType;

public class GeodesyMLMoxyTest {

    private GeodesyMLMoxy marshaller;

    public GeodesyMLMoxyTest() throws Exception {
        marshaller = new GeodesyMLMoxy();
    }

    @Test
    public void unmarshal() throws Exception {
        Reader input = new InputStreamReader(Thread.currentThread()
            .getContextClassLoader()
            .getResourceAsStream("sitelog/geodesyml/MOBS.xml"));

        GeodesyMLType geodesyML = marshaller.unmarshal(input).getValue();

        geodesyML.getNodeOrAbstractPositionOrPositionPairCovariance().forEach(x -> {
            System.out.println(x.getName());
        });

    }
}

@@ -92,16 +92,41 @@
 eader;%0A%0A
+import org.junit.Assert;%0A
 import o
@@ -682,24 +682,127 @@
 etValue();%0A%0A
+        Assert.assertEquals(24, geodesyML.getNodeOrAbstractPositionOrPositionPairCovariance().size());%0A
         geod
@@ -931,17 +931,16 @@
     %7D);%0A
-%0A
     %7D%0A%7D%0A

Add test condition to GeodesyML unmarshall test.