public class Verify extends Object
Verifications that pass return a null string. Verifications that don't pass return a string with a useful error message.
Modifier | Constructor and Description |
---|---|
protected |
Verify(Object o)
Create a new verifier object.
|
Modifier and Type | Method and Description |
---|---|
String |
is(Object expected)
Verifies that this object is equal to the specified object.
|
String |
isFalse()
Verifies that this object is equal to
Boolean.FALSE . |
String |
isTrue()
Verifies that this object is equal to
Boolean.TRUE . |
String |
isType(Class<?> type)
Verifies that this object is of the specified type.
|
Verify |
msg(String msg,
Object args)
Overrides the default error message produced by the verification.
|
static Verify |
verify(Object o)
Create a new verifier object.
|
public static Verify verify(Object o)
o
- The object being verified.public Verify msg(String msg, Object args)
msg
- The error message.args
- Optional message arguments.public String isType(Class<?> type)
type
- The type to test against.public String is(Object expected)
expected
- The object to test against for equality.public String isTrue()
Boolean.TRUE
.public String isFalse()
Boolean.FALSE
.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.