Details
Description
Currently, a JBehave test scenario require inheriting from the base Scenario class. Certain other test frameworks may also require inheritance, but multiple inheritance is not allowed in Java. For this reason, configuration of a delegate Scenario may be preferred. I created a blog entry with the necessary code to accomplish this:
http://blog.davidron.com/2009/12/breaking-jbehave-inheritance-hierarchy.html
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Summary | Should be able to use Jbehave without inheriting from a base class | Should be able to use JBehave without inheriting from a base class |
Fix Version/s | 3.0 [ 16302 ] |
Mauro Talevi
made changes -
Assignee | Mauro Talevi [ maurotalevi ] |
Mauro Talevi
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Mauro Talevi
made changes -
Comment |
[ There is now a RunnableStoryDelegator (which JUnitStory extends) that can be used to compose the instance of RunnableStory without inheritance. ] |
Mauro Talevi
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Look at org.jbehave.examples.trader.spring.SpringTraderRunner in the trader example.
It shows how with new embeddable architecture (
JBEHAVE-267), users can leverage any framework to run stories.In particular, the example above uses Spring JUnit4 Class Runner.