mardi 3 mai 2016

Unit test How to create a mock object for DynamicForm in play framework (java)

I am new to unit test.

I have a controller it use formfactory.form().bindFromRequest()

when I have mocking it, It throws null pointer exception for

bindFromRequest()

ie.

when(formfactoryMock.form()).thenReturn(df.bind(params).bindFromRequest());

How to fix it?

Aucun commentaire:

Enregistrer un commentaire