Package randoop.test
Class InvalidChecks
java.lang.Object
randoop.test.InvalidChecks
- All Implemented Interfaces:
TestChecks<InvalidChecks>
An empty or singleton set. It contains at most one InvalidExceptionCheck or InvalidValueCheck,
which captures invalid behavior in a sequence.
-
Field Summary
Modifier and TypeFieldDescriptionprivate Check
static final InvalidChecks
An empty, immutable set of invalid checks. -
Constructor Summary
ConstructorDescriptionCreate an empty, mutable set of invalid checks.InvalidChecks
(Check check) Create a singleton set of invalid checks. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a check to this set.checks()
Get all non-exception checks and whether they are passing for this object.commonChecks
(InvalidChecks other) Returns the intersection of checks in this set and another set.int
count()
Return the number of checks in this test.Return the exception check in this object if there is one.boolean
Indicates whether this object has checks.boolean
Indicate whether this object has any failing checks.boolean
Indicates whether this set of checks contains any invalid behaviors.
-
Field Details
-
EMPTY
An empty, immutable set of invalid checks. -
check
-
-
Constructor Details
-
InvalidChecks
public InvalidChecks()Create an empty, mutable set of invalid checks. -
InvalidChecks
Create a singleton set of invalid checks.- Parameters:
check
- the sole member of the newly-created singleton set
-
-
Method Details
-
count
public int count()Description copied from interface:TestChecks
Return the number of checks in this test.- Specified by:
count
in interfaceTestChecks<InvalidChecks>
- Returns:
- the count of checks in this object
-
checks
Description copied from interface:TestChecks
Get all non-exception checks and whether they are passing for this object.- Specified by:
checks
in interfaceTestChecks<InvalidChecks>
- Returns:
- all checks with passing status
-
hasChecks
public boolean hasChecks()Description copied from interface:TestChecks
Indicates whether this object has checks.- Specified by:
hasChecks
in interfaceTestChecks<InvalidChecks>
- Returns:
- true if this object has checks, false otherwise
-
hasErrorBehavior
public boolean hasErrorBehavior()Description copied from interface:TestChecks
Indicate whether this object has any failing checks. (This is essentially asking whether this is an error revealing test.)- Specified by:
hasErrorBehavior
in interfaceTestChecks<InvalidChecks>
- Returns:
- true if this object has failing checks, false otherwise
-
getExceptionCheck
Description copied from interface:TestChecks
Return the exception check in this object if there is one.- Specified by:
getExceptionCheck
in interfaceTestChecks<InvalidChecks>
- Returns:
- the expected exception check, null otherwise
-
add
Description copied from interface:TestChecks
Add a check to this set.- Specified by:
add
in interfaceTestChecks<InvalidChecks>
- Parameters:
check
- the check object to add to this set of checks
-
commonChecks
Description copied from interface:TestChecks
Returns the intersection of checks in this set and another set.- Specified by:
commonChecks
in interfaceTestChecks<InvalidChecks>
- Parameters:
other
- theTestChecks
to compare with- Returns:
- the checks common to this set of checks and those in
other
-
hasInvalidBehavior
public boolean hasInvalidBehavior()Description copied from interface:TestChecks
Indicates whether this set of checks contains any invalid behaviors.- Specified by:
hasInvalidBehavior
in interfaceTestChecks<InvalidChecks>
- Returns:
- true when this contains checks for invalid behavior, false otherwise
-