• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

How to know what kind of error using Mockito and Junit ?

 
Ranch Hand
Posts: 667
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi experts,

I am new to Mockito and JUnit.

So, I tried my hand on testing out the JNDI connection class :





But, when I run the test in Eclipse, it doesn't give me any clue to what error...

Can I know if I have missed out something important or how to make Junit tells me what is wrong or if the Connection works ?

Thanks!
 
Sheriff
Posts: 15987
265
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You declare connection as a Mock and yet you make an assertion that it's not null. Why?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic