Coverage Report - org.apache.maven.surefire.failsafe.model.FailsafeSummary
 
Classes in this File Line Coverage Branch Coverage Complexity
FailsafeSummary
0%
0/44
0%
0/20
2.182
 
 1  
 /*
 2  
  =================== DO NOT EDIT THIS FILE ====================
 3  
  Generated by Modello 1.4.1 on 2012-01-24 23:21:02,
 4  
  any modifications will be overwritten.
 5  
  ==============================================================
 6  
  */
 7  
 
 8  
 package org.apache.maven.surefire.failsafe.model;
 9  
 
 10  
 /**
 11  
  * 
 12  
  *         Describes the results of executing tests
 13  
  *       .
 14  
  * 
 15  
  * @version $Revision$ $Date$
 16  
  */
 17  
 @SuppressWarnings( "all" )
 18  0
 public class FailsafeSummary
 19  
     implements java.io.Serializable
 20  
 {
 21  
 
 22  
       //--------------------------/
 23  
      //- Class/Member Variables -/
 24  
     //--------------------------/
 25  
 
 26  
     /**
 27  
      * The surefire result code.
 28  
      */
 29  0
     private int result = 0;
 30  
 
 31  
     /**
 32  
      * [DEPRECATED] The (original) exception that caused surefire
 33  
      * to bomb out.
 34  
      */
 35  
     private String exception;
 36  
 
 37  
     /**
 38  
      * Field exceptions.
 39  
      */
 40  
     private java.util.List<String> exceptions;
 41  
 
 42  
     /**
 43  
      * Field modelEncoding.
 44  
      */
 45  0
     private String modelEncoding = "UTF-8";
 46  
 
 47  
 
 48  
       //-----------/
 49  
      //- Methods -/
 50  
     //-----------/
 51  
 
 52  
     /**
 53  
      * Method addException.
 54  
      * 
 55  
      * @param string
 56  
      */
 57  
     public void addException( String string )
 58  
     {
 59  0
         getExceptions().add( string );
 60  0
     } //-- void addException( String )
 61  
 
 62  
     /**
 63  
      * Get [DEPRECATED] The (original) exception that caused
 64  
      * surefire to bomb out.
 65  
      * 
 66  
      * @return String
 67  
      */
 68  
     public String getException()
 69  
     {
 70  0
         return this.exception;
 71  
     } //-- String getException()
 72  
 
 73  
     /**
 74  
      * Method getExceptions.
 75  
      * 
 76  
      * @return List
 77  
      */
 78  
     public java.util.List<String> getExceptions()
 79  
     {
 80  0
         if ( this.exceptions == null )
 81  
         {
 82  0
             this.exceptions = new java.util.ArrayList<String>();
 83  
         }
 84  
 
 85  0
         return this.exceptions;
 86  
     } //-- java.util.List<String> getExceptions()
 87  
 
 88  
     /**
 89  
      * Get the modelEncoding field.
 90  
      * 
 91  
      * @return String
 92  
      */
 93  
     public String getModelEncoding()
 94  
     {
 95  0
         return this.modelEncoding;
 96  
     } //-- String getModelEncoding()
 97  
 
 98  
     /**
 99  
      * Get the surefire result code.
 100  
      * 
 101  
      * @return int
 102  
      */
 103  
     public int getResult()
 104  
     {
 105  0
         return this.result;
 106  
     } //-- int getResult()
 107  
 
 108  
     /**
 109  
      * Method removeException.
 110  
      * 
 111  
      * @param string
 112  
      */
 113  
     public void removeException( String string )
 114  
     {
 115  0
         getExceptions().remove( string );
 116  0
     } //-- void removeException( String )
 117  
 
 118  
     /**
 119  
      * Set [DEPRECATED] The (original) exception that caused
 120  
      * surefire to bomb out.
 121  
      * 
 122  
      * @param exception
 123  
      */
 124  
     public void setException( String exception )
 125  
     {
 126  0
         this.exception = exception;
 127  0
     } //-- void setException( String )
 128  
 
 129  
     /**
 130  
      * Set the exception(s) that caused surefire to bomb out.
 131  
      * 
 132  
      * @param exceptions
 133  
      */
 134  
     public void setExceptions( java.util.List<String> exceptions )
 135  
     {
 136  0
         this.exceptions = exceptions;
 137  0
     } //-- void setExceptions( java.util.List )
 138  
 
 139  
     /**
 140  
      * Set the modelEncoding field.
 141  
      * 
 142  
      * @param modelEncoding
 143  
      */
 144  
     public void setModelEncoding( String modelEncoding )
 145  
     {
 146  0
         this.modelEncoding = modelEncoding;
 147  0
     } //-- void setModelEncoding( String )
 148  
 
 149  
     /**
 150  
      * Set the surefire result code.
 151  
      * 
 152  
      * @param result
 153  
      */
 154  
     public void setResult( int result )
 155  
     {
 156  0
         this.result = result;
 157  0
     } //-- void setResult( int )
 158  
 
 159  
     
 160  
     /**
 161  
      * Merges the summary result with this summary result.
 162  
      *
 163  
      * @param summary The summary to merge.
 164  
      * @since 2.6
 165  
      */
 166  
     public void merge( FailsafeSummary summary )
 167  
     {
 168  0
         switch ( this.result )
 169  
         {
 170  
             case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_SUCCEEDED_EXIT_CODE:
 171  0
                 this.result = summary.result;
 172  0
                 break;
 173  
             case org.apache.maven.surefire.booter.ProviderConfiguration.NO_TESTS_EXIT_CODE:
 174  0
                 switch ( summary.result )
 175  
                 {
 176  
                     case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_SUCCEEDED_EXIT_CODE:
 177  0
                         break;
 178  
                     case org.apache.maven.surefire.booter.ProviderConfiguration.NO_TESTS_EXIT_CODE:
 179  0
                         break;
 180  
                     case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_FAILED_EXIT_CODE:
 181  0
                         this.result = summary.result;
 182  0
                         break;
 183  
                     default:
 184  0
                         this.result = summary.result;
 185  0
                         break;
 186  
                 }
 187  
                 break;
 188  
             case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_FAILED_EXIT_CODE:
 189  0
                 switch ( summary.result )
 190  
                 {
 191  
                     case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_SUCCEEDED_EXIT_CODE:
 192  0
                         break;
 193  
                     case org.apache.maven.surefire.booter.ProviderConfiguration.NO_TESTS_EXIT_CODE:
 194  0
                         break;
 195  
                     case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_FAILED_EXIT_CODE:
 196  0
                         break;
 197  
                     default:
 198  0
                         this.result = summary.result;
 199  0
                         break;
 200  
                 }
 201  
                 break;
 202  
             default:
 203  
                 break;
 204  
         }
 205  
         
 206  0
         if ( this.exception == null )
 207  
         {
 208  0
             this.exception = summary.exception;
 209  
         }
 210  
         
 211  0
         if ( summary.exceptions != null )
 212  
         {
 213  0
             if ( this.exceptions == null )
 214  
             {
 215  0
                 this.exceptions = summary.exceptions;
 216  
             }
 217  
             else
 218  
             {
 219  0
                 this.exceptions.addAll( summary.exceptions );
 220  
             }
 221  
         }
 222  0
     }
 223  
           
 224  
 }