1 package org.apache.maven.plugin.surefire.booterclient;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.plugin.surefire.StartupReportConfiguration;
23 import org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter;
24 import org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter;
25 import org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter;
26 import org.apache.maven.plugin.surefire.report.DefaultReporterFactory;
27 import org.apache.maven.plugin.surefire.log.api.NullConsoleLogger;
28 import org.apache.maven.surefire.api.report.TestOutputReportEntry;
29 import org.apache.maven.surefire.api.report.TestReportListener;
30
31 import java.io.File;
32
33
34
35
36
37
38 public class TestSetMockReporterFactory
39 extends DefaultReporterFactory
40 {
41 public TestSetMockReporterFactory()
42 {
43 super( defaultValue(), new NullConsoleLogger() );
44 }
45
46 @Override
47 public TestReportListener<TestOutputReportEntry> createTestReportListener()
48 {
49 return new MockReporter();
50 }
51
52
53
54
55
56
57
58 private static StartupReportConfiguration defaultValue()
59 {
60 File target = new File( "./target" );
61 File statisticsFile = new File( target, "TESTHASH" );
62 return new StartupReportConfiguration( true, true, "PLAIN", false, target, false, null, statisticsFile,
63 false, 0, null, null, true, new SurefireStatelessReporter(), new SurefireConsoleOutputReporter(),
64 new SurefireStatelessTestsetInfoReporter() );
65 }
66 }