Package org.jbehave.examples.core.annotations

Source Code of org.jbehave.examples.core.annotations.CoreStoriesUsingScanning

package org.jbehave.examples.core.annotations;

import static org.jbehave.core.io.CodeLocations.codeLocationFromPath;

import java.util.List;

import org.jbehave.core.io.StoryFinder;
import org.jbehave.core.steps.InjectableStepsFactory;
import org.jbehave.core.steps.ScanningStepsFactory;
import org.jbehave.examples.core.CoreStories;

/**
* <p>
* Example of how multiple stories can be run via JUnit, finding steps
* via the {@link ScanningStepsFactory}.
* </p>
*/
public class CoreStoriesUsingScanning extends CoreStories {

    @Override
    public InjectableStepsFactory stepsFactory() {
        return new ScanningStepsFactory(configuration(), "org.jbehave.examples.core.steps").notMatchingNames(".*Failing.*");
    }

    @Override
    protected List<String> storyPaths() {
        return new StoryFinder().findPaths(codeLocationFromPath("../core/src/main/java"), "**/*.story", "");
    }

}
TOP

Related Classes of org.jbehave.examples.core.annotations.CoreStoriesUsingScanning

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.