mock « Annotation « Spring Q&A





1. Mock object and Spring annotations    stackoverflow.com

I am using Spring annotations in my code to do the DI. So lets say I have a class class1 that depends on another class class2, I define class1 as below:

@Component
public ...

2. How to map individual servlet to spring framework and test it's doPost method using unit testing?    stackoverflow.com

I have implemented fileupload functionality using apache commons file upload library and implemented logic in doPost method of the servlet. Now I want to unit test doPost method fo the servlet ...