@@ -0,0 +1,2463 @@
+package simple.xml.load;%0A%0Aimport java.io.FileOutputStream;%0Aimport java.io.StringWriter;%0A%0Aimport simple.xml.ValidationTestCase;%0Aimport simple.xml.ElementArray;%0Aimport simple.xml.Element;%0Aimport simple.xml.Attribute;%0Aimport simple.xml.Text;%0Aimport simple.xml.Root;%0A%0Apublic class TextTest extends ValidationTestCase %7B%0A        %0A   private static final String SOURCE =%0A   %22%3Ctest%3E%5Cn%22+%0A   %22   %3Carray%3E%5Cn%22+%0A   %22     %3Ctext name='a' version='ONE'%3EExample 1%3C/text%3E%5Cr%5Cn%22+%0A   %22     %3Ctext name='b' version='TWO'%3EExample 2%3C/text%3E%5Cr%5Cn%22+%0A   %22     %3Ctext name='c' version='THREE'%3EExample 3%3C/text%3E%5Cr%5Cn%22+%0A   %22   %3C/array%3E%5Cn%5Cr%22+%0A   %22%3C/test%3E%22;%0A   %0A%0A   @Root(name=%22test%22)%0A   private static class TextList %7B%0A%0A      @ElementArray(name=%22array%22)%0A      private TextEntry%5B%5D array;%0A   %7D%0A%0A   @Root(name=%22text%22)%0A   private static class TextEntry %7B%0A%0A      @Attribute(name=%22name%22)%0A      private String name;%0A%0A      @Attribute(name=%22version%22)%0A      private Version version;        %0A%0A      @Text%0A      private String text;%0A   %7D%0A%0A   private enum Version %7B%0A           %0A      ONE,%0A      TWO,%0A      THREE%0A   %7D%0A%0A   private Persister persister;%0A%0A   public void setUp() throws Exception %7B%0A      persister = new Persister();%0A   %7D%0A%09%0A   public void testText() throws Exception %7B    %0A      TextList list = persister.read(TextList.class, SOURCE);%0A%0A      assertEquals(list.array%5B0%5D.version, Version.ONE);%0A      assertEquals(list.array%5B0%5D.name, %22a%22);%0A      assertEquals(list.array%5B0%5D.text, %22Example 1%22);%0A      assertEquals(list.array%5B1%5D.version, Version.TWO);%0A      assertEquals(list.array%5B1%5D.name, %22b%22);%0A      assertEquals(list.array%5B1%5D.text, %22Example 2%22);%0A      assertEquals(list.array%5B2%5D.version, Version.THREE);%0A      assertEquals(list.array%5B2%5D.name, %22c%22);%0A      assertEquals(list.array%5B2%5D.text, %22Example 3%22);%0A      %0A      StringWriter buffer = new StringWriter();%0A      persister.write(list, buffer);%0A      validate(list, persister);%0A%0A      list = persister.read(TextList.class, buffer.toString());%0A%0A      assertEquals(list.array%5B0%5D.version, Version.ONE);%0A      assertEquals(list.array%5B0%5D.name, %22a%22);%0A      assertEquals(list.array%5B0%5D.text, %22Example 1%22);%0A      assertEquals(list.array%5B1%5D.version, Version.TWO);%0A      assertEquals(list.array%5B1%5D.name, %22b%22);%0A      assertEquals(list.array%5B1%5D.text, %22Example 2%22);%0A      assertEquals(list.array%5B2%5D.version, Version.THREE);%0A      assertEquals(list.array%5B2%5D.name, %22c%22);%0A      assertEquals(list.array%5B2%5D.text, %22Example 3%22);%0A      %0A      validate(list, persister);%0A   %7D%0A%7D%0A

Add unit testing for text annotations