Coverage Report - org.jbehave.core.model.Scenario
 
Classes in this File Line Coverage Branch Coverage Complexity
Scenario
100%
19/19
N/A
1
 
 1  
 package org.jbehave.core.model;
 2  
 
 3  
 import static java.util.Collections.unmodifiableList;
 4  
 
 5  
 import java.util.Arrays;
 6  
 import java.util.List;
 7  
 
 8  
 import org.apache.commons.lang.builder.ToStringBuilder;
 9  
 import org.apache.commons.lang.builder.ToStringStyle;
 10  
 
 11  
 public class Scenario {
 12  
 
 13  
     private final String title;
 14  
     private final List<String> givenStoryPaths;
 15  
     private final List<String> steps;
 16  
     private final ExamplesTable examplesTable;
 17  
 
 18  
     public Scenario() {
 19  6
         this(Arrays.<String>asList());
 20  6
     }
 21  
 
 22  
     public Scenario(List<String> steps) {
 23  13
         this("", steps);
 24  13
     }
 25  
 
 26  
     public Scenario(String title, List<String> steps) {
 27  20
         this(title, Arrays.<String>asList(), new ExamplesTable(""), steps);
 28  20
     }
 29  
 
 30  
     public Scenario(String title, List<String> givenStoryPaths, List<String> steps) {
 31  1
         this(title, givenStoryPaths, new ExamplesTable(""), steps);
 32  1
     }
 33  
     
 34  138
     public Scenario(String title, List<String> givenStoryPaths, ExamplesTable examplesTable, List<String> steps) {
 35  138
         this.title = title;
 36  138
         this.givenStoryPaths = givenStoryPaths;
 37  138
         this.steps = steps;
 38  138
         this.examplesTable = examplesTable;
 39  138
     }
 40  
 
 41  
     public List<String> getGivenStoryPaths() {
 42  22
         return unmodifiableList(givenStoryPaths);
 43  
     }
 44  
 
 45  
     public List<String> getSteps() {
 46  121
         return unmodifiableList(steps);
 47  
     }
 48  
 
 49  
     public String getTitle() {
 50  23
         return title;
 51  
     }
 52  
 
 53  
     public ExamplesTable getExamplesTable() {
 54  18
         return examplesTable;
 55  
     }
 56  
 
 57  
     @Override
 58  
     public String toString() {
 59  15
         return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
 60  
     }
 61  
 
 62  
 }