testdriven.com Wrangling quality out of chaos

JDave 0.8.0, behavior driven development for Java

05.19.2007 · Posted in Java

JDave is a framework which provides an easy way to specify behavior of your classes. Key concepts are specification, which is a container for behaviors. Behaviors define the behavior of a class and they are always expressed within some context. Context defines the setting where particular behavior applies.

For example, we could specify a Stack by first identifying that it has (at least) three interesting states, an empty stack, a full stack and a stack which is neither empty nor full. We would then continue by specifying the behavior of a Stack when it is in these states. The behavior can then be expressed as:

Stack specification
Empty stack
– is empty
– is no longer empty after push
– …
Full stack
– is full
– complains on push
– contains all items
– …
Stack which is neither empty nor full
– adds to the top when pushing new item
– …

  • del.icio.us
  • Digg
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Comments are closed