public class GetterDescription extends DataDescription implements Comparable<GetterDescription>
Let's say we have the following method in class Person
:
public int getAge()
To generate PersonAssert
hasAge(int expectedAge)
assertion in PersonAssert
, we
need to know :
Person
doesn't need to have an age
field, just the getAge
method.
visibility
Constructor and Description |
---|
GetterDescription(String propertyName,
com.google.common.reflect.TypeToken<?> owningType,
Method method) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GetterDescription other) |
com.google.common.collect.ImmutableList<com.google.common.reflect.TypeToken<? extends Throwable>> |
getExceptions() |
Method |
getOriginalMember() |
boolean |
isPredicate() |
equals, getAssertTypeName, getElementAssertTypeName, getElementTypeName, getFullyQualifiedTypeName, getName, getNegativePredicate, getNegativePredicateForErrorMessagePart1, getNegativePredicateForErrorMessagePart2, getNegativePredicateForJavadoc, getPredicate, getPredicateForErrorMessagePart1, getPredicateForErrorMessagePart2, getPredicateForJavadoc, getTypeName, hashCode, isArrayType, isCharType, isIterableType, isPrimitiveType, isPrimitiveWrapperType, isPublic, isRealNumberType, isWholeNumberType, toString
public Method getOriginalMember()
getOriginalMember
in class DataDescription
public int compareTo(GetterDescription other)
compareTo
in interface Comparable<GetterDescription>
public com.google.common.collect.ImmutableList<com.google.common.reflect.TypeToken<? extends Throwable>> getExceptions()
public boolean isPredicate()
isPredicate
in class DataDescription
Copyright © 2021 AssertJ. All rights reserved.