Coverage Report - org.apache.maven.surefire.booter.ProviderConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
ProviderConfiguration
0%
0/23
0%
0/2
1,077
 
 1  
 package org.apache.maven.surefire.booter;
 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.io.File;
 23  
 import java.util.List;
 24  
 import java.util.Properties;
 25  
 import org.apache.maven.surefire.report.ReporterConfiguration;
 26  
 import org.apache.maven.surefire.testset.DirectoryScannerParameters;
 27  
 import org.apache.maven.surefire.testset.RunOrderParameters;
 28  
 import org.apache.maven.surefire.testset.TestArtifactInfo;
 29  
 import org.apache.maven.surefire.testset.TestRequest;
 30  
 
 31  
 /**
 32  
  * Represents the surefire configuration that passes all the way into the provider
 33  
  * classloader and the provider.
 34  
  * <p/>
 35  
  *
 36  
  * @author Jason van Zyl
 37  
  * @author Emmanuel Venisse
 38  
  * @author Kristian Rosenvold
 39  
  */
 40  
 public class ProviderConfiguration
 41  
 {
 42  
     /**
 43  
      * @noinspection UnusedDeclaration
 44  
      */
 45  
     public static final int TESTS_SUCCEEDED_EXIT_CODE = 0;
 46  
 
 47  
     public static final int TESTS_FAILED_EXIT_CODE = 255;
 48  
 
 49  
     public static final int NO_TESTS_EXIT_CODE = 254;
 50  
 
 51  
     private final DirectoryScannerParameters dirScannerParams;
 52  
 
 53  
     private final ReporterConfiguration reporterConfiguration;
 54  
 
 55  
     private final TestArtifactInfo testArtifact;
 56  
 
 57  
     private final TestRequest testSuiteDefinition;
 58  
 
 59  
     private final RunOrderParameters runOrderParameters;
 60  
 
 61  
     private final Properties providerProperties;
 62  
 
 63  
     private final boolean failIfNoTests;
 64  
 
 65  
     private final TypeEncodedValue forkTestSet;
 66  
 
 67  
     private final boolean readTestsFromInStream;
 68  
 
 69  
     public ProviderConfiguration( DirectoryScannerParameters directoryScannerParameters,
 70  
                                   RunOrderParameters runOrderParameters, boolean failIfNoTests,
 71  
                                   ReporterConfiguration reporterConfiguration, TestArtifactInfo testArtifact,
 72  
                                   TestRequest testSuiteDefinition, Properties providerProperties,
 73  
                                   TypeEncodedValue typeEncodedTestSet, boolean readTestsFromInStream )
 74  0
     {
 75  0
         this.runOrderParameters = runOrderParameters;
 76  0
         this.providerProperties = providerProperties;
 77  0
         this.reporterConfiguration = reporterConfiguration;
 78  0
         this.testArtifact = testArtifact;
 79  0
         this.testSuiteDefinition = testSuiteDefinition;
 80  0
         this.dirScannerParams = directoryScannerParameters;
 81  0
         this.failIfNoTests = failIfNoTests;
 82  0
         this.forkTestSet = typeEncodedTestSet;
 83  0
         this.readTestsFromInStream = readTestsFromInStream;
 84  0
     }
 85  
 
 86  
 
 87  
     public ReporterConfiguration getReporterConfiguration()
 88  
     {
 89  0
         return reporterConfiguration;
 90  
     }
 91  
 
 92  
 
 93  
     public Boolean isFailIfNoTests()
 94  
     {
 95  0
         return ( failIfNoTests ) ? Boolean.TRUE : Boolean.FALSE;
 96  
     }
 97  
 
 98  
     public File getBaseDir()
 99  
     {
 100  0
         return dirScannerParams.getTestClassesDirectory();
 101  
     }
 102  
 
 103  
 
 104  
     public DirectoryScannerParameters getDirScannerParams()
 105  
     {
 106  0
         return dirScannerParams;
 107  
     }
 108  
 
 109  
     public List getIncludes()
 110  
     {
 111  0
         return dirScannerParams.getIncludes();
 112  
     }
 113  
 
 114  
     public List getExcludes()
 115  
     {
 116  0
         return dirScannerParams.getExcludes();
 117  
     }
 118  
 
 119  
     public TestArtifactInfo getTestArtifact()
 120  
     {
 121  0
         return testArtifact;
 122  
     }
 123  
 
 124  
     public TestRequest getTestSuiteDefinition()
 125  
     {
 126  0
         return testSuiteDefinition;
 127  
     }
 128  
 
 129  
     public Properties getProviderProperties()
 130  
     {
 131  0
         return providerProperties;
 132  
     }
 133  
 
 134  
     public TypeEncodedValue getTestForFork()
 135  
     {
 136  0
         return forkTestSet;
 137  
     }
 138  
 
 139  
     public RunOrderParameters getRunOrderParameters()
 140  
     {
 141  0
         return runOrderParameters;
 142  
     }
 143  
 
 144  
 
 145  
     public boolean isReadTestsFromInStream()
 146  
     {
 147  0
         return readTestsFromInStream;
 148  
     }
 149  
 }