View Javadoc

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  
23  import java.util.Properties;
24  import org.apache.maven.surefire.report.ReporterConfiguration;
25  import org.apache.maven.surefire.testset.DirectoryScannerParameters;
26  import org.apache.maven.surefire.testset.RunOrderParameters;
27  import org.apache.maven.surefire.testset.TestArtifactInfo;
28  import org.apache.maven.surefire.testset.TestRequest;
29  
30  /**
31   * @author Kristian Rosenvold
32   */
33  public class Foo
34      implements DirectoryScannerParametersAware, TestRequestAware, ProviderPropertiesAware, ReporterConfigurationAware,
35      SurefireClassLoadersAware, TestArtifactInfoAware, RunOrderParametersAware
36  {
37      DirectoryScannerParameters directoryScannerParameters;
38  
39      Properties providerProperties;
40  
41      ReporterConfiguration reporterConfiguration;
42  
43      ClassLoader surefireClassLoader;
44  
45      ClassLoader testClassLoader;
46  
47      TestRequest testRequest;
48  
49      TestArtifactInfo testArtifactInfo;
50  
51      RunOrderParameters runOrderParameters;
52  
53      boolean called = false;
54  
55      public void setDirectoryScannerParameters( DirectoryScannerParameters directoryScanner )
56      {
57          this.directoryScannerParameters = directoryScanner;
58          this.called = true;
59      }
60  
61  
62      /**
63       * @return true if it has been callsed
64       * @noinspection UnusedDeclaration
65       */
66      public Boolean isCalled()
67      {
68          return called;
69      }
70  
71      public void setProviderProperties( Properties providerProperties )
72      {
73          this.providerProperties = providerProperties;
74          this.called = true;
75      }
76  
77      public void setReporterConfiguration( ReporterConfiguration reporterConfiguration )
78      {
79          this.reporterConfiguration = reporterConfiguration;
80          this.called = true;
81      }
82  
83      public void setClassLoaders( ClassLoader testClassLoader )
84      {
85          this.testClassLoader = testClassLoader;
86          this.surefireClassLoader = surefireClassLoader;
87          this.called = true;
88      }
89  
90      public void setTestRequest( TestRequest testRequest1 )
91      {
92          this.testRequest = testRequest1;
93          this.called = true;
94      }
95  
96      public void setTestArtifactInfo( TestArtifactInfo testArtifactInfo )
97      {
98          this.testArtifactInfo = testArtifactInfo;
99          this.called = true;
100     }
101 
102     public void setRunOrderParameters( RunOrderParameters runOrderParameters )
103     {
104         this.runOrderParameters = runOrderParameters;
105         this.called = true;
106     }
107 }