package com.arondor.common.w3c2gwt;

import org.junit.Assert;
import org.junit.Test;

public class SimpleTest
{
    @Test
    public void parseAndSerialize_Simple()
    {
        String xml = "<someRoot attr=\"value1\">someContent</someRoot>";

        Document doc = XMLParser.parse(xml);

        String result = doc.toString();

        Assert.assertEquals(xml, result);
    }
}

@@ -105,16 +105,193 @@
 eTest%0A%7B%0A
+    private void testXml(String xml)%0A    %7B%0A        Document doc = XMLParser.parse(xml);%0A        String result = doc.toString();%0A        Assert.assertEquals(xml, result);%0A    %7D%0A%0A
     @Tes
@@ -418,135 +418,378 @@
 %3E%22;%0A
+        testXml(xml);
 %0A    
+%7D%0A%0A
     
-Document doc = XMLParser.parse(xml);%0A%0A        String result = doc.toString();%0A%0A        Assert.assertEquals(xml, result
+@Test%0A    public void test_singleElement()%0A    %7B%0A        testXml(%22%3CmyElement/%3E%22);%0A    %7D%0A%0A    @Test%0A    public void test_singleElementSingleAttribute()%0A    %7B%0A        testXml(%22%3CmyElement myAttribute=%5C%22myValue%5C%22/%3E%22);%0A    %7D%0A%0A    @Test%0A    public void test_singleElementTextValue()%0A    %7B%0A        testXml(%22%3CmyElement%3Emy text value%3C/myElement%3E%22
 );%0A 

Add some xml-parsing Unit tests