Coverage Report - org.jbehave.core.configuration.MostUsefulConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
MostUsefulConfiguration
100%
16/16
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.ParameterControls;
 22  
 import org.jbehave.core.steps.SilentStepMonitor;
 23  
 import org.jbehave.core.steps.StepCollector;
 24  
 import org.jbehave.core.steps.StepFinder;
 25  
 import org.jbehave.core.steps.StepMonitor;
 26  
 
 27  
 import com.thoughtworks.paranamer.NullParanamer;
 28  
 import com.thoughtworks.paranamer.Paranamer;
 29  
 
 30  
 /**
 31  
  * The configuration that works for most situations that users are likely to encounter.
 32  
  * The elements configured are:
 33  
  * <ul>
 34  
  * <li>{@link Keywords}: {@link LocalizedKeywords}</li>
 35  
  * <li>{@link StoryParser}: {@link RegexStoryParser}</li>
 36  
  * <li>{@link StoryLoader}: {@link LoadFromClasspath}</li>
 37  
  * <li>{@link StoryControls}: {@link StoryControls}</li>
 38  
  * <li>{@link FailureStrategy}: {@link RethrowingFailure}</li>
 39  
  * <li>{@link PendingStepStrategy}: {@link PassingUponPendingStep}</li>
 40  
  * <li>{@link DefaultStoryReporter}: {@link ConsoleOutput}</li>
 41  
  * <li>{@link StepCollector}: {@link MarkUnmatchedStepsAsPending}</li>
 42  
  * <li>{@link StepFinder}: {@link StepFinder}</li>
 43  
  * <li>{@link StepPatternParser}: {@link RegexPrefixCapturingPatternParser}</li>
 44  
  * <li>{@link StepdocReporter}: {@link PrintStreamStepdocReporter}</li>
 45  
  * <li>{@link StepMonitor}: {@link SilentStepMonitor}
 46  
  * <li>{@link Paranamer}: {@link NullParanamer}</li>
 47  
  * <li>{@link ParameterControls}: {@link ParameterControls}</li>
 48  
  * <li>{@link ViewGenerator}: {@link FreemarkerViewGenerator}</li>
 49  
  * </ul>
 50  
  */
 51  
 public class MostUsefulConfiguration extends Configuration {
 52  
 
 53  262
     public MostUsefulConfiguration() {
 54  262
         useKeywords(new LocalizedKeywords());
 55  262
         useStoryControls(new StoryControls());
 56  262
         useStoryLoader(new LoadFromClasspath());
 57  262
         useStoryParser(new RegexStoryParser(keywords()));
 58  262
         useFailureStrategy(new RethrowingFailure());
 59  262
         usePendingStepStrategy(new PassingUponPendingStep());
 60  262
         useStepCollector(new MarkUnmatchedStepsAsPending());
 61  262
         useStepFinder(new StepFinder());
 62  262
         useStepPatternParser(new RegexPrefixCapturingPatternParser());
 63  262
         useStepMonitor(new SilentStepMonitor());
 64  262
         useStepdocReporter(new PrintStreamStepdocReporter());
 65  262
         useParanamer(new NullParanamer());
 66  262
         useParameterControls(new ParameterControls());
 67  262
         useViewGenerator(new FreemarkerViewGenerator());
 68  262
     }
 69  
 
 70  
 }