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