• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

MissingMethodException on unit test case

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
below code snippet is my unit test case code for groovy class

public void testUserList(){

 setup()
 
 def userList =  [['name':'12345678', 'actual_name':'Paul allan']]
 
 
 
 List<User>  tempList = new ArrayList<User>()

  mocksql.demand.eachrow{
 def query, closure ->
  userList.each(closure)
 }
 
 mocksql.use{
 apply1 = new apply1(<connection string goes here>,
 <username>, <password>,
 <schemaname>,
"oracle.jdbc.driver.OracleDriver")
 tempList=apply1.getapply1UserList()
 }
 
 }
 
}


while running this test case in Eclipse Luna using maven build getting below error
Errors:
[ERROR]   com.double.example.application.appMockTest#testUserList MissingMethodException

any one of you could please throw some light on this. how to fix.  
Note: saw few online discussions but nothing worked out.

Thanks in advance.

 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic