Class GradleTestListenerWrapper
java.lang.Object
io.github.mov2day.unifiedtest.reporting.GradleTestListenerWrapper
- All Implemented Interfaces:
org.gradle.api.tasks.testing.TestListener
public class GradleTestListenerWrapper
extends Object
implements org.gradle.api.tasks.testing.TestListener
Wrapper class that implements Gradle's TestListener interface and delegates to framework-specific listeners.
This allows us to integrate our framework-specific listeners with Gradle's test execution.
-
Constructor Summary
ConstructorsConstructorDescriptionGradleTestListenerWrapper(UnifiedTestResultCollector collector, ConsoleReporter reporter) Creates a new wrapper with the specified collector and reporter. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterSuite(org.gradle.api.tasks.testing.TestDescriptor suite, org.gradle.api.tasks.testing.TestResult result) voidafterTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor, org.gradle.api.tasks.testing.TestResult result) voidbeforeSuite(org.gradle.api.tasks.testing.TestDescriptor suite) voidbeforeTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor) Gets the test result collector.Gets the console reporter.
-
Constructor Details
-
GradleTestListenerWrapper
Creates a new wrapper with the specified collector and reporter.- Parameters:
collector- the test result collectorreporter- the console reporter
-
-
Method Details
-
beforeSuite
public void beforeSuite(org.gradle.api.tasks.testing.TestDescriptor suite) - Specified by:
beforeSuitein interfaceorg.gradle.api.tasks.testing.TestListener
-
afterSuite
public void afterSuite(org.gradle.api.tasks.testing.TestDescriptor suite, org.gradle.api.tasks.testing.TestResult result) - Specified by:
afterSuitein interfaceorg.gradle.api.tasks.testing.TestListener
-
beforeTest
public void beforeTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor) - Specified by:
beforeTestin interfaceorg.gradle.api.tasks.testing.TestListener
-
afterTest
public void afterTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor, org.gradle.api.tasks.testing.TestResult result) - Specified by:
afterTestin interfaceorg.gradle.api.tasks.testing.TestListener
-
getCollector
Gets the test result collector.- Returns:
- the test result collector
-
getReporter
Gets the console reporter.- Returns:
- the console reporter
-