StudentTestResult

public final class StudentTestResult<T> extends Record(source)

The result of a StudentTest.

Parameters

state

the state of the test

toTest

the object that was tested

throwable

the Throwable that was thrown during the test

message

the message of the result or null if no message was set

test

the StudentTest that generated this result

<T>

the type of the object that was tested

Constructors

Link copied to clipboard
public void StudentTestResult()

Types

Link copied to clipboard
public class Builder<T>
A builder for StudentTestResults.

Functions

Link copied to clipboard
public static StudentTestResult.Builder<T> builder<T>(StudentTest<T> test)
Creates a new Builder for the given test.
Creates a new Builder for the given StudentTestResult and copies all values from it.
Link copied to clipboard
public abstract boolean equals(Object p)
Link copied to clipboard
public boolean hasFailed()
Returns whether the test has failed.
Link copied to clipboard
public boolean hasFailedByAssertion()
Returns whether toTest matches the predicate of the test.
Link copied to clipboard
public boolean hasFailedWithException()
Returns whether there was an exception during the test execution.
Link copied to clipboard
public abstract int hashCode()
Link copied to clipboard
public boolean hasPassed()
Returns whether the test was successful.
Link copied to clipboard
public abstract String toString()