commit 399b0152ba366bb3548e9da7e7e29fa82331c1d8 Author: Mauro Talevi <mauro.tal...@aquilonia.org> AuthorDate: Tue May 15 11:51:07 2012 +0200 Commit: Mauro Talevi <mauro.tal...@aquilonia.org> CommitDate: Tue May 15 11:51:52 2012 +0200
JBEHAVE-781: Deprecated ConfigurableEmbedder addSteps() methods in favour of useStepsFactory(). diff --git a/jbehave-core/src/main/java/org/jbehave/core/ConfigurableEmbedder.java b/jbehave-core/src/main/java/org/jbehave/core/ConfigurableEmbedder.java index 0b0dcd7..8ab354a 100755 --- a/jbehave-core/src/main/java/org/jbehave/core/ConfigurableEmbedder.java +++ b/jbehave-core/src/main/java/org/jbehave/core/ConfigurableEmbedder.java @@ -24,9 +24,8 @@ import org.jbehave.core.steps.InjectableStepsFactory; * via the {@link #useConfiguration(Configuration)} method. * </p> * <p> - * Users need to add the {@link CandidateSteps} instances, via the - * {@link #addSteps(CandidateSteps...)} or {@link - * #addSteps(List<CandidateSteps>)} methods. + * Users need to specify the {@link InjectableStepsFactory} which will be + * used to create the {@link CandidateSteps}. * </p> * <p> * Typically, users that use JUnit will find it easier to extend other @@ -50,26 +49,35 @@ public abstract class ConfigurableEmbedder implements Embeddable { this.configuration = configuration; } + public Configuration configuration() { + return configuration; + } + + /** + * @deprecated Use {@link #useStepsFactory(InjectableStepsFactory)} + */ public void addSteps(CandidateSteps... steps) { addSteps(asList(steps)); } + /** + * @deprecated Use {@link #useStepsFactory(InjectableStepsFactory)} + */ public void addSteps(List<CandidateSteps> steps) { this.candidateSteps.addAll(steps); } - public void useStepsFactory(InjectableStepsFactory stepsFactory){ - this.stepsFactory = stepsFactory; - } - - public Configuration configuration() { - return configuration; - } - + /** + * @deprecated Use {@link #stepsFactory()} + */ public List<CandidateSteps> candidateSteps() { return candidateSteps; } + public void useStepsFactory(InjectableStepsFactory stepsFactory){ + this.stepsFactory = stepsFactory; + } + public InjectableStepsFactory stepsFactory(){ return stepsFactory; }