package jsx3.xml;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Unit test for simple App.
 */
public class CdfDocumentTest
{
    /**
     * Rigorous Test :-)
     */
    @Test
    public void testApp()
    {
        CdfDocument document = new CdfDocument("root");

        Record record = new Record("US").setAttribute("index", "1");
        document.appendRecord(record);

        String xml = document.toXml();

        assertEquals(xml, "");
    }
}
/*
<data jsxid="jsxroot">
<record index="1" jsxid="US" jsxtext="United States"/>
<record index="2" jsxid="UK" jsxtext="United Kingdom"/>
<record index="3" jsxid="AG" jsxtext="Afghanistan"/>
<record index="4" jsxid="AL" jsxtext="Albania"/>
<record index="5" jsxid="AR" jsxtext="Algeria"/>
<record index="6" jsxid="AS" jsxtext="American Samoa"/>
<record index="7" jsxid="AD" jsxtext="Andorra"/>
<record index="8" jsxid="AO" jsxtext="Angola"/>
<record index="9" jsxid="AU" jsxtext="Anguilla"/>
</data>
*/

@@ -446,36 +446,29 @@
 sert
-Equals(xml, %22%22);%0A    %7D%0A%7D%0A/*%0A
+True(xml.startsWith(%22
 %3Cdat
@@ -479,16 +479,17 @@
 xid=
+%5C
 %22jsxroot
 %22%3E%0A%3C
@@ -488,483 +488,137 @@
 root
+%5C
 %22%3E
-%0A%3Crecord index=%221%22 jsxid=%22US%22 jsxtext=%22United States%22/%3E%0A%3Crecord index=%222%22 jsxid=%22UK%22 jsxtext=%22United Kingdom%22/%3E%0A%3Crecord index=%223%22 jsxid=%22AG%22 jsxtext=%22Afghanistan%22/%3E%0A%3Crecord index=%224%22 jsxid=%22AL%22 jsxtext=%22Albania%22/%3E%0A%3Crecord index=%225%22 jsxid=%22AR%22 jsxtext=%22Algeria%22/%3E%0A%3Crecord index=%226%22 jsxid=%22AS%22 jsxtext=%22American Samoa%22/%3E%0A%3Crecord index=%227%22 jsxid=%22AD%22 jsxtext=%22Andorra%22/%3E%0A%3Crecord index=%228%22 jsxid=%22AO%22 jsxtext=%22Angola%22/%3E%0A%3Crecord index=%229%22 jsxid=%22AU%22 jsxtext=%22Anguilla%22/%3E%0A%3C/data%3E%0A*/
+%22));%0A        assertTrue(xml.contains(%22%3Crecord jsxid=%5C%22US%5C%22 index=%5C%221%5C%22/%3E%22));%0A        assertTrue(xml.contains(%22%3C/data%3E%22));%0A    %7D%0A%7D
 %0A

Fix to the GI CDF test, so now all tests from SVN pass