Coverage Report - org.jbehave.core.steps.ContextStepMonitor
 
Classes in this File Line Coverage Branch Coverage Complexity
ContextStepMonitor
0%
0/9
N/A
1
 
 1  
 package org.jbehave.core.steps;
 2  
 
 3  
 import org.jbehave.core.context.ContextView;
 4  
 import org.jbehave.core.context.Context;
 5  
 
 6  
 /**
 7  
  * Decorator of {@link StepMonitor} which shows the current context via the
 8  
  * {@link ContextView}.
 9  
  */
 10  
 public class ContextStepMonitor extends DelegatingStepMonitor {
 11  
 
 12  
         private final Context context;
 13  
         private final ContextView view;
 14  
 
 15  
         public ContextStepMonitor(Context context, ContextView view,
 16  
                         StepMonitor delegate) {
 17  0
                 super(delegate);
 18  0
                 this.context = context;
 19  0
                 this.view = view;
 20  0
         }
 21  
 
 22  
         public void performing(String step, boolean dryRun) {
 23  0
                 String currentStory = context.getCurrentStory();
 24  0
                 String currentScenario = context.getCurrentScenario();
 25  0
                 view.show(currentStory, currentScenario, step);
 26  0
                 super.performing(step, dryRun);
 27  0
         }
 28  
 
 29  
 }