Coverage Report - org.jbehave.core.configuration.MostUsefulConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
MostUsefulConfiguration
100%
15/15
N/A
1
 
 1  
 package org.jbehave.core.configuration;
 2  
 
 3  
 import org.jbehave.core.embedder.StoryControls;
 4  
 import org.jbehave.core.failures.FailureStrategy;
 5  
 import org.jbehave.core.failures.PassingUponPendingStep;
 6  
 import org.jbehave.core.failures.PendingStepStrategy;
 7  
 import org.jbehave.core.failures.RethrowingFailure;
 8  
 import org.jbehave.core.i18n.LocalizedKeywords;
 9  
 import org.jbehave.core.io.LoadFromClasspath;
 10  
 import org.jbehave.core.io.StoryLoader;
 11  
 import org.jbehave.core.parsers.RegexPrefixCapturingPatternParser;
 12  
 import org.jbehave.core.parsers.RegexStoryParser;
 13  
 import org.jbehave.core.parsers.StepPatternParser;
 14  
 import org.jbehave.core.parsers.StoryParser;
 15  
 import org.jbehave.core.reporters.ConsoleOutput;
 16  
 import org.jbehave.core.reporters.FreemarkerViewGenerator;
 17  
 import org.jbehave.core.reporters.PrintStreamStepdocReporter;
 18  
 import org.jbehave.core.reporters.StepdocReporter;
 19  
 import org.jbehave.core.reporters.ViewGenerator;
 20  
 import org.jbehave.core.steps.MarkUnmatchedStepsAsPending;
 21  
 import org.jbehave.core.steps.SilentStepMonitor;
 22  
 import org.jbehave.core.steps.StepCollector;
 23  
 import org.jbehave.core.steps.StepFinder;
 24  
 import org.jbehave.core.steps.StepMonitor;
 25  
 
 26  
 import com.thoughtworks.paranamer.NullParanamer;
 27  
 import com.thoughtworks.paranamer.Paranamer;
 28  
 
 29  
 /**
 30  
  * The configuration that works for most situations that users are likely to encounter.
 31  
  * The elements configured are:
 32  
  * <ul>
 33  
  * <li>{@link Keywords}: {@link LocalizedKeywords}</li>
 34  
  * <li>{@link StoryParser}: {@link RegexStoryParser}</li>
 35  
  * <li>{@link StoryLoader}: {@link LoadFromClasspath}</li>
 36  
  * <li>{@link FailureStrategy}: {@link RethrowingFailure}</li>
 37  
  * <li>{@link PendingStepStrategy}: {@link PassingUponPendingStep}</li>
 38  
  * <li>{@link DefaultStoryReporter}: {@link ConsoleOutput}</li>
 39  
  * <li>{@link StepCollector}: {@link MarkUnmatchedStepsAsPending}</li>
 40  
  * <li>{@link StepFinder}: {@link StepFinder}</li>
 41  
  * <li>{@link StepPatternParser}: {@link RegexPrefixCapturingPatternParser}</li>
 42  
  * <li>{@link StepdocReporter}: {@link PrintStreamStepdocReporter}</li>
 43  
  * <li>{@link StepMonitor}: {@link SilentStepMonitor}
 44  
  * <li>{@link Paranamer}: {@link NullParanamer}</li>
 45  
  * <li>{@link ViewGenerator}: {@link FreemarkerViewGenerator}</li>
 46  
  * </ul>
 47  
  */
 48  
 public class MostUsefulConfiguration extends Configuration {
 49  
 
 50  219
     public MostUsefulConfiguration() {
 51  219
         useKeywords(new LocalizedKeywords());
 52  219
         useStoryControls(new StoryControls());
 53  219
         useStoryLoader(new LoadFromClasspath());
 54  219
         useStoryParser(new RegexStoryParser(keywords()));
 55  219
         useFailureStrategy(new RethrowingFailure());
 56  219
         usePendingStepStrategy(new PassingUponPendingStep());
 57  219
         useStepCollector(new MarkUnmatchedStepsAsPending());
 58  219
         useStepFinder(new StepFinder());
 59  219
         useStepPatternParser(new RegexPrefixCapturingPatternParser());
 60  219
         useStepMonitor(new SilentStepMonitor());
 61  219
         useStepdocReporter(new PrintStreamStepdocReporter());
 62  219
         useParanamer(new NullParanamer());
 63  219
         useViewGenerator(new FreemarkerViewGenerator());
 64  219
     }
 65  
 
 66  
 }