Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JUnit testing HttpURLConnection

 
Dave kavana
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm pretty new to unit testing but having trouble testing or mocking HttpURLConnection. All the code does is test if valid URL was entered and the pings back if online.



Here is my test code so far:


thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic