Now that you have seen how to create your tests, let's see how to use VRaptor's ProxyTestPlugin to make it easier.
Go to your vraptor.xml file and register the plugin:
<plugin>org.vraptor.plugin.ProxyTestPlugin</plugin>
Start your webserver and try executing vraptor's first example.
What happens? Try with values: guilherme silveira, vergueiro, 17.
The output shows you the entire java code for the test you have just executed. For example:
TestSession session = ENGINE.createSession(); String result = session.execute("person.add.logic", "person.name=guilherme silveira", "person.address=vergueiro", "person.preferredNumber=17"); assertEquals("ok",result); You have created a new person named guilherme silveira, who lives at vergueiro and his/her preferred number is 17.
Therefore this plugin is useful for generating tests that have not been planned before... just create the code and use it to implement the test method in your test case.