|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.assertj.core.internal.Classes
public class Classes
Reusable assertions for s.
Class
| Constructor Summary | |
|---|---|
Classes()
|
|
| Method Summary | |
|---|---|
void |
assertContainsAnnotations(AssertionInfo info,
Class<?> actual,
Class<? extends Annotation>... annotations)
Verifies that the actual Class contains the given Annotations. |
void |
assertHasDeclaredFields(AssertionInfo info,
Class<?> actual,
String... fields)
Verifies that the actual Class has the declared fields. |
void |
assertHasFields(AssertionInfo info,
Class<?> actual,
String... fields)
Verifies that the actual Class has the fields. |
void |
assertIsAnnotation(AssertionInfo info,
Class<?> actual)
Verifies that the actual Class is an annotation. |
void |
assertIsAssignableFrom(AssertionInfo info,
Class<?> actual,
Class<?>... others)
Verifies that the actual Class is assignable from all the others classes. |
void |
assertIsInterface(AssertionInfo info,
Class<?> actual)
Verifies that the actual Class is an interface. |
void |
assertIsNotAnnotation(AssertionInfo info,
Class<?> actual)
Verifies that the actual Class is not an annotation. |
void |
assertIsNotInterface(AssertionInfo info,
Class<?> actual)
Verifies that the actual Class is not an interface. |
static Classes |
instance()
Returns the singleton instance of this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Classes()
| Method Detail |
|---|
public static Classes instance()
public void assertIsAssignableFrom(AssertionInfo info,
Class<?> actual,
Class<?>... others)
Class is assignable from all the others classes.
info - contains information about the assertion.actual - the "actual" Class.others - the others Class who this actual class must be assignable.
NullPointerException - if one of the others is null.
AssertionError - if actual is null.
AssertionError - if the actual Class is not assignable from all of the others classes.
public void assertIsNotInterface(AssertionInfo info,
Class<?> actual)
Class is not an interface.
info - contains information about the assertion.actual - the "actual" Class.
AssertionError - if actual is null.
AssertionError - if the actual Class is an interface.
public void assertIsInterface(AssertionInfo info,
Class<?> actual)
Class is an interface.
info - contains information about the assertion.actual - the "actual" Class.
AssertionError - if actual is null.
AssertionError - if the actual Class is not an interface.
public void assertIsNotAnnotation(AssertionInfo info,
Class<?> actual)
Class is not an annotation.
info - contains information about the assertion.actual - the "actual" Class.
AssertionError - if actual is null.
AssertionError - if the actual Class is an annotation.
public void assertIsAnnotation(AssertionInfo info,
Class<?> actual)
Class is an annotation.
info - contains information about the assertion.actual - the "actual" Class.
AssertionError - if actual is null.
AssertionError - if the actual Class is not an annotation.
public void assertContainsAnnotations(AssertionInfo info,
Class<?> actual,
Class<? extends Annotation>... annotations)
Class contains the given Annotations.
info - contains information about the assertion.actual - the "actual" Class.annotations - annotations who must be attached to the class
AssertionError - if actual is null.
AssertionError - if the actual Class doesn't contains all of these annotations.
public void assertHasFields(AssertionInfo info,
Class<?> actual,
String... fields)
Class has the fields.
info - contains information about the assertion.actual - the "actual" Class.fields - the fields who must be present in the class.
AssertionError - if actual is null.
AssertionError - if the actual Class doesn't contains all of the field.
public void assertHasDeclaredFields(AssertionInfo info,
Class<?> actual,
String... fields)
Class has the declared fields.
info - contains information about the assertion.actual - the "actual" Class.fields - the fields who must be declared in the class.
AssertionError - if actual is null.
AssertionError - if the actual Class doesn't contains all of the field.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||