• Post Reply Bookmark Topic Watch Topic
  • New Topic

Appropriate level of testing  RSS feed

 
Rob Dennett
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was doing some TDD for a new version of an app we are creating and I wanted to test this



I wound up writing this (and I realize the test for the Controller annotation on the class is inappropriate, but I will fix that)



Is this overkill?

Thanks,
Rob
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does TDD mean?
 
Rob Dennett
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jimmy Clark wrote:What does TDD mean?


Test-Driven Development.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is overkill. I would just test the return value in a unit test and test the annotation path when I do web testing.

The getting the correct annotation isn't testing something with meaning per se. It's testing you have the annotation you typed.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!