Coverage Report - org.apache.maven.surefire.report.MulticastingReporter
 
Classes in this File Line Coverage Branch Coverage Complexity
MulticastingReporter
0%
0/34
0%
0/20
1.909
 
 1  
 package org.apache.maven.surefire.report;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *     http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import java.util.List;
 23  
 
 24  
 /**
 25  
  * A reporter that broadcasts to other reporters
 26  
  *
 27  
  * @author Kristian Rosenvold
 28  
  */
 29  
 public class MulticastingReporter
 30  
     implements Reporter
 31  
 {
 32  
     private final Reporter[] target;
 33  
     private final int size;
 34  
 
 35  
     public MulticastingReporter( List target )
 36  0
     {
 37  0
         size = target.size();
 38  0
         this.target = (Reporter[]) target.toArray( new Reporter[target.size()] );
 39  0
     }
 40  
 
 41  
     public void testSetStarting( ReportEntry report )
 42  
     {
 43  0
         for (int i = 0; i < size; i++){
 44  0
             target[i].testSetStarting( report );
 45  
         }
 46  0
     }
 47  
 
 48  
     public void testSetCompleted( ReportEntry report )
 49  
     {
 50  0
         for (int i = 0; i < size; i++){
 51  0
             target[i].testSetCompleted( report );
 52  
         }
 53  0
     }
 54  
 
 55  
 
 56  
     public void testStarting( ReportEntry report )
 57  
     {
 58  0
         for (int i = 0; i < size; i++){
 59  0
             target[i].testStarting( report );
 60  
         }
 61  0
     }
 62  
 
 63  
     public void testSucceeded( ReportEntry report )
 64  
     {
 65  0
         for (int i = 0; i < size; i++){
 66  0
             target[i].testSucceeded( report );
 67  
         }
 68  0
     }
 69  
 
 70  
     public void testError( ReportEntry report, String stdOut, String stdErr )
 71  
     {
 72  0
         for (int i = 0; i < size; i++){
 73  0
             target[i].testError( report, stdOut, stdErr );
 74  
         }
 75  0
     }
 76  
 
 77  
     public void testFailed( ReportEntry report, String stdOut, String stdErr )
 78  
     {
 79  0
         for (int i = 0; i < size; i++){
 80  0
             target[i].testFailed( report, stdOut, stdErr );
 81  
         }
 82  0
     }
 83  
 
 84  
     public void testSkipped( ReportEntry report )
 85  
     {
 86  0
         for (int i = 0; i < size; i++){
 87  0
             target[i].testSkipped( report );
 88  
         }
 89  0
     }
 90  
 
 91  
     public void writeMessage( String message )
 92  
     {
 93  0
         for (int i = 0; i < size; i++){
 94  0
             target[i].writeMessage( message );
 95  
         }
 96  0
     }
 97  
 
 98  
     public void writeMessage( byte[] b, int off, int len )
 99  
     {
 100  0
         for (int i = 0; i < size; i++){
 101  0
             target[i].writeMessage( b, off, len );
 102  
         }
 103  0
     }
 104  
 
 105  
     public void reset()
 106  
     {
 107  0
         for (int i = 0; i < size; i++){
 108  0
             target[i].reset();
 109  
         }
 110  0
     }
 111  
 
 112  
 }