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  
     private final DirectoryScannerParameters dirScannerParams;
 48  
 
 49  
     private final ReporterConfiguration reporterConfiguration;
 50  
 
 51  
     private final TestArtifactInfo testArtifact;
 52  
 
 53  
     private final TestRequest testSuiteDefinition;
 54  
 
 55  
     private final RunOrderParameters runOrderParameters;
 56  
 
 57  
     private final Properties providerProperties;
 58  
 
 59  
     private final boolean failIfNoTests;
 60  
 
 61  
     private final TypeEncodedValue forkTestSet;
 62  
 
 63  
     private final boolean readTestsFromInStream;
 64  
 
 65  
     public ProviderConfiguration( DirectoryScannerParameters directoryScannerParameters,
 66  
                                   RunOrderParameters runOrderParameters, boolean failIfNoTests,
 67  
                                   ReporterConfiguration reporterConfiguration, TestArtifactInfo testArtifact,
 68  
                                   TestRequest testSuiteDefinition, Properties providerProperties,
 69  
                                   TypeEncodedValue typeEncodedTestSet, boolean readTestsFromInStream )
 70  0
     {
 71  0
         this.runOrderParameters = runOrderParameters;
 72  0
         this.providerProperties = providerProperties;
 73  0
         this.reporterConfiguration = reporterConfiguration;
 74  0
         this.testArtifact = testArtifact;
 75  0
         this.testSuiteDefinition = testSuiteDefinition;
 76  0
         this.dirScannerParams = directoryScannerParameters;
 77  0
         this.failIfNoTests = failIfNoTests;
 78  0
         this.forkTestSet = typeEncodedTestSet;
 79  0
         this.readTestsFromInStream = readTestsFromInStream;
 80  0
     }
 81  
 
 82  
 
 83  
     public ReporterConfiguration getReporterConfiguration()
 84  
     {
 85  0
         return reporterConfiguration;
 86  
     }
 87  
 
 88  
 
 89  
     public Boolean isFailIfNoTests()
 90  
     {
 91  0
         return ( failIfNoTests ) ? Boolean.TRUE : Boolean.FALSE;
 92  
     }
 93  
 
 94  
     public File getBaseDir()
 95  
     {
 96  0
         return dirScannerParams.getTestClassesDirectory();
 97  
     }
 98  
 
 99  
 
 100  
     public DirectoryScannerParameters getDirScannerParams()
 101  
     {
 102  0
         return dirScannerParams;
 103  
     }
 104  
 
 105  
     public List getIncludes()
 106  
     {
 107  0
         return dirScannerParams.getIncludes();
 108  
     }
 109  
 
 110  
     public List getExcludes()
 111  
     {
 112  0
         return dirScannerParams.getExcludes();
 113  
     }
 114  
 
 115  
     public TestArtifactInfo getTestArtifact()
 116  
     {
 117  0
         return testArtifact;
 118  
     }
 119  
 
 120  
     public TestRequest getTestSuiteDefinition()
 121  
     {
 122  0
         return testSuiteDefinition;
 123  
     }
 124  
 
 125  
     public Properties getProviderProperties()
 126  
     {
 127  0
         return providerProperties;
 128  
     }
 129  
 
 130  
     public TypeEncodedValue getTestForFork()
 131  
     {
 132  0
         return forkTestSet;
 133  
     }
 134  
 
 135  
     public RunOrderParameters getRunOrderParameters()
 136  
     {
 137  0
         return runOrderParameters;
 138  
     }
 139  
 
 140  
 
 141  
     public boolean isReadTestsFromInStream()
 142  
     {
 143  0
         return readTestsFromInStream;
 144  
     }
 145  
 }