Liz asked about the link between behaviour classes and story classes. (Check out her Blog, she is way cool)
The behaviour class relates to an individual test. It is the equivalent of the unit test class.
For foo, there will be a foobehaviour class. This will contain the methods fooShouldDoSomething.
The story class is the equivalent to the user acceptance test. The Story class will contain given(s), an event and outcome(s). The given(s) set up the context and includes mocks etc. The event class calls the foo class which initially uses mocks. As the mocks are implemented, the mocks in the givens are replaced by the real classes. The behaviour classes however continue to use mocks.
The diagram below attempts to show this.
The outer most class in the app will have a call from the story class and the behaviour class. Classes within the app will only be called from the behaviour classes.

Ah, now it makes sense. Thank you for your patient explanation! Any chance that these notes could go up on the JBehave home page? At the moment I don't think anyone outside TW knows how to use the extensions, which seems a real shame.
Posted by: Liz at December 11, 2004 12:04 PM