How to test HTML code with dbunit
Posted by Martin Homik | Posted in Java, WebApp | Posted on 22-04-2008
2
As you know, I am working with AppFuse, and one important part of AppFuse is testing. To do that, you need sample data which is imported into the database. The dbunit sample data specifications says, that you can use any parsed character data as value but it does not say how to add html snippets into the database. To do that, you have to escape html entities. Below is an example for a body value element of table storing blog posts:
-
<value description="body">
-
&lt;p align="justify"&gt;London is the largest urban area and capital of England and the United Kingdom. &lt;p&gt;
-
</value>


I do not believe this
Try and comment if something is wrong.