I am trying to write unit test for a Rest api call which is having a POST method for adding a video file to web based application using Jersey2. Here is the signature of the method of my class(TemplateController.java) for which I want to write unit test:
Here is my test method of the test class (TemplateControllerUnitTestCase.java):
I'm able to pass the AttachmentDAO object to the TemplateController class from test class but unable to pass the request object which is becoming null in the method(addVideoData()) of the TemplateController.java class.
I'm using RequestHelper class which is a helper class for HttpServletRequest, so I want to pass an object of this class to the method(addVideoData()) using Jersey2 test framework.
I have to finish this task as soon as possible. Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire