• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Mock

 
Antara pramanick
Greenhorn
Posts: 1
MyEclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello , I am new to coderanch . I want some step by step guidance to use PowerMockito to mock objects and to mock calls to the database which are in a code. I will elaborate with code I have

Suppose there is a handler class :
which makes a call to the db to get a status and than update the database with changes made in the status.I need to test this handler using mockito.

Thank you in advance .

Please try and help me out on this .Breaking my head on this past 2 weeks

 
Junilu Lacar
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried that didn't work?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic