On a side note:
As I ran all the behaviours to make sure that everything still works,
I realized that we have reverted the behaviour collection to this:
public Class[] getBehaviours() {
return new Class[] {UsingCollectionMatchersBehaviour.class,
UsingEqualityMatchersBehaviour.class,
UsingLogicalMatchersBehaviour.class,
UsingExceptionsBehaviour.class,
UsingMatchersBehaviour.class,
UsingStringMatchersBehaviour.class,
BehaviourClassBehaviour.class,
BehaviourMethodBehaviour.class,
BehaviourVerifierBehaviour.class,
PlainTextMethodListenerBehaviour.class,
MiniMockObjectBehaviour.class,
UsingMiniMockBehaviour.class,
ExpectationBehaviour.class,
ResultBehaviour.class,
org.jbehave.core.story.AllBehaviours.class,
org.jbehave.core.matchers.AllBehaviours.class,
JBehaveFrameworkErrorBehaviour.class,
};
Com'on, you gota admit this is not going to scale and someone will
make a mistake sooner or later, if not already.
I know the reason behind removing the reference to cotta but I don't
think this is a working solution either. I think I have a good
solution. What about using cotta for test only. I have created a
jbehave extension in cotta and used it in my other projects so that
the behaviour collection is like this:
public Class[] getBehaviours() {
return new BehavioursLoader(getClass()).loadBehaviours();
}
+1 to a test-scoped cotta dependency.
For the moment, I've introduced Behaviours instances for all packages, so that AllBehaviours is
unlikely to change very often. But it does require any additional behaviour to be added to the
appropriate package Behaviours instance.
public class AllBehaviours implements Behaviours {
public Class[] getBehaviours() {
return new Class[] {
BehaviourRunnerBehaviour.class,
BehaviourBehaviours.class,
ExceptionBehaviours.class,
ListenerBehaviours.class,
MatchersBehaviours.class,
MiniMockBehaviours.class,
MockBehaviours.class,
ResultBehaviours.class,
StoryBehaviours.class,
ThreadedBehaviours.class,
UtilBehaviours.class
};
}
}
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email