Agile Java: Assertions and Annotations [PDF]
Agile Java: Assertions and Annotations [PDF]
Submitted by webmaster@testdriven.com (Links) on Sat, 02/07/2005 - 13:47. javaJ2SE 5.0 introduced a new facility known as annotations. Annotations are a metaprogramming facility that allow you to mark code with arbitrarily defined tags. The tags (generally) have no meaning to the Java compiler or runtime itself. Instead, other tools can interpret these tags. Examples of tools for which annotations might be useful include IDEs, testing tools, profiling tools, and code-generation tools.
In this lesson you will begin to build a testing tool, similar to JUnit, based upon Javas annotation capabilities. The testing tool, like JUnit, will need to allow developers to specify assertions. Instead of coding assertion methods, you will learn to use Javas built-in assertion capability.
Author: Jeff Langr
Excerpted from Agile Java: Crafting Code with Test-Driven Development
In this lesson you will begin to build a testing tool, similar to JUnit, based upon Javas annotation capabilities. The testing tool, like JUnit, will need to allow developers to specify assertions. Instead of coding assertion methods, you will learn to use Javas built-in assertion capability.
Author: Jeff Langr
Excerpted from Agile Java: Crafting Code with Test-Driven Development
