abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckopp...@apache.org
Subject svn commit: r946769 - /abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/XhtmlTest.java
Date Thu, 20 May 2010 19:25:35 GMT
Author: ckoppelt
Date: Thu May 20 19:25:35 2010
New Revision: 946769

URL: http://svn.apache.org/viewvc?rev=946769&view=rev
Log:
added Testcase for HTML special characters

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

Modified: abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/XhtmlTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/XhtmlTest.java?rev=946769&r1=946768&r2=946769&view=diff
==============================================================================
--- abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/XhtmlTest.java
(original)
+++ abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/XhtmlTest.java
Thu May 20 19:25:35 2010
@@ -49,4 +49,17 @@ public class XhtmlTest {
     
   }
   
+  @Test
+  public void testSpecialCharacters (){
+      Abdera abdera = new Abdera();
+      Entry entry = abdera.newEntry();
+      entry.setContentAsXhtml("<p>&Auml;sthetik</p>");
+      assertNotNull(entry.getContent());
+      assertEquals( Content.Type.XHTML, entry.getContentType());
+      Element el = entry.getContentElement().getValueElement();
+      char umlaut = el.getFirstChild().getText().charAt(0);
+      //hexadecimal value of &Auml; is U+00C4
+      assertEquals("c4", Integer.toHexString(umlaut));
+  }
+  
 }



Mime
View raw message