Coverage Report - org.jbehave.core.configuration.PrintStreamAnnotationMonitor
 
Classes in this File Line Coverage Branch Coverage Complexity
PrintStreamAnnotationMonitor
100%
10/10
N/A
1
 
 1  
 package org.jbehave.core.configuration;
 2  
 
 3  
 import java.io.PrintStream;
 4  
 import java.lang.annotation.Annotation;
 5  
 
 6  
 public class PrintStreamAnnotationMonitor implements AnnotationMonitor {
 7  
 
 8  
     private final PrintStream output;
 9  
 
 10  
     public PrintStreamAnnotationMonitor() {
 11  14
         this(System.out);
 12  14
     }
 13  
 
 14  14
     public PrintStreamAnnotationMonitor(PrintStream output) {
 15  14
         this.output = output;
 16  14
     }
 17  
 
 18  
     public void elementCreationFailed(Class<?> elementClass, Exception cause) {
 19  2
         output.println("Element creation failed: " + elementClass);
 20  2
         cause.printStackTrace(output);
 21  2
     }
 22  
 
 23  
     public void annotationNotFound(Class<? extends Annotation> annotation, Object annotatedInstance) {
 24  4
         output.println("Annotation " + annotation + " not found in "+annotatedInstance);        
 25  4
     }
 26  
 
 27  
 }