Coverage Report - org.jbehave.core.failures.BeforeOrAfterFailed
 
Classes in this File Line Coverage Branch Coverage Complexity
BeforeOrAfterFailed
100%
4/4
N/A
1
 
 1  
 package org.jbehave.core.failures;
 2  
 
 3  
 import java.lang.reflect.Method;
 4  
 
 5  
 import static java.text.MessageFormat.format;
 6  
 import static java.util.Arrays.asList;
 7  
 
 8  
 /**
 9  
  * Thrown when methods with before or after annotations (story or scenario)
 10  
  * fail.
 11  
  */
 12  
 @SuppressWarnings("serial")
 13  
 public class BeforeOrAfterFailed extends RuntimeException {
 14  
 
 15  
     public BeforeOrAfterFailed(Method method, Throwable cause) {
 16  2
         super(format("Method {0}, annotated with {1}, failed", method, asList(method.getAnnotations())), cause);
 17  2
     }
 18  
 
 19  
     public BeforeOrAfterFailed(Throwable cause) {
 20  1
         super(cause);
 21  1
     }
 22  
 }