Junit test in WEB4J

Skip to first unread message

pavan yadav

Dec 2, 2014, 9:10:06 AM12/2/14
to web4j...@googlegroups.com
Please guide me to create junit test cases for DAO and Action Classess using Mocking tool(like mokito).

Thanks & Regards
Pavan Yadav

John O'Hanley

Dec 2, 2014, 9:34:51 AM12/2/14
to web4j...@googlegroups.com
There are some remarks on unit testing in the user guide.


The example apps don't make use of any mocking tool per se.

The Fish & Chips example app has some junit tests.

That's really all I can do for you.

- John.

Swati Khandelwal

Dec 4, 2014, 1:47:24 AM12/4/14
to web4j...@googlegroups.com
What we can see in fish & Chips application is that there is a usage of fake classes. But, by doing so, we modify the code and technically, this should not happen. It would be great if you could give us a clear picture on how the JUnit test cases can be written for Prediction application.

John O'Hanley

Dec 4, 2014, 7:44:35 AM12/4/14
to web4j...@googlegroups.com
No, you're not modifying the code being tested. It remains the same. Otherwise it wouldn't be a real test.

The junit test cases can be written for the Predictions app in the same way as shown in the Fish app.

- John O'Hanley
Reply all
Reply to author
0 new messages