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