File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes Appropriate level of testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Appropriate level of testing" Watch "Appropriate level of testing" New topic
Author

Appropriate level of testing

Rob Dennett
Ranch Hand

Joined: Dec 07, 2010
Posts: 79
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

Joined: Apr 16, 2008
Posts: 2187
What does TDD mean?
Rob Dennett
Ranch Hand

Joined: Dec 07, 2010
Posts: 79
Jimmy Clark wrote:What does TDD mean?


Test-Driven Development.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Appropriate level of testing
 
Similar Threads
JUnit beginner
Validation is not working in Annotaion based controller
@Controller annotation query
InternalResourceViewResolver failing JUnit test -- Spring Demo Source
@ModelAttribute behavior