abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r524829 - /incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
Date Mon, 02 Apr 2007 16:34:11 GMT
Author: jmsnell
Date: Mon Apr  2 09:34:08 2007
New Revision: 524829

URL: http://svn.apache.org/viewvc?view=rev&rev=524829
Log:
Add a test to catch the setContent(element, mediatype) bug

Modified:
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java?view=diff&rev=524829&r1=524828&r2=524829
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
(original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FOMTest.java
Mon Apr  2 09:34:08 2007
@@ -753,4 +753,19 @@
     assertEquals(lang.getSubtag(0), "US");
     assertEquals(lang.getLocale(), java.util.Locale.US);
   }
+  
+  public void testSetContent() throws Exception {
+    
+    Abdera abdera = new Abdera();
+    
+    Entry entry = abdera.newEntry();
+    Document<Element> foodoc = abdera.getParser().parse(
+      new ByteArrayInputStream("<a><b><c/></b></a>".getBytes()));
+    Element foo = foodoc.getRoot();
+    entry.setContent(foo, "application/foo+xml");
+    assertEquals(entry.getContentElement().getValueElement(),foo);
+    
+    
+    
+  }
 }



Mime
View raw message