Class TestResultRecorder
java.lang.Object
com.softicar.gradle.test.logger.plugin.test.result.TestResultRecorder
Accumulates results of test method executions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrievesTestFailureinstances from the recorded test results.booleanisEmpty()voidrecordResult(org.gradle.api.tasks.testing.TestDescriptor descriptor, org.gradle.api.tasks.testing.TestResult result) Records the givenTestResultfor a specific test method, identified via the givenTestDescriptor.intsize()
-
Constructor Details
-
TestResultRecorder
public TestResultRecorder()
-
-
Method Details
-
recordResult
public void recordResult(org.gradle.api.tasks.testing.TestDescriptor descriptor, org.gradle.api.tasks.testing.TestResult result) Records the givenTestResultfor a specific test method, identified via the givenTestDescriptor.If invoked several times per test method, the most recently-recorded result will prevail.
- Parameters:
descriptor- the descriptor that identifies the test method (never null)result- the result of the test method run (never null)
-
getFailures
RetrievesTestFailureinstances from the recorded test results.If a failure and a subsequent success were recorded for a given test method, the returned
Collectionwill not contain aTestFailureinstance for that test method.- Returns:
- the relevant recorded
TestFailureinstances (never null)
-
isEmpty
public boolean isEmpty() -
size
public int size()
-