Assertions3
The Assertions3 class is a collection of test utils for verifying the declarations of classes, methods, fields, etc.
Functions
Link copied to clipboard
public static ConstructorLink assertConstructorExists(TypeLink link, Matcher<? super ConstructorLink> matcher)
Assert that a constructor with the given characteristics exists in the given TypeLink.
Link copied to clipboard
Asserts that the given org.tudalgo.algoutils.tutor.general.reflections.Link has the correct modifiers.
Link copied to clipboard
public static T assertCorrectParameters<T extends WithTypeList>(T withParameters, Array<Matcher<? super TypeLink>> matchers)
Assert that the parameters of the given WithTypeList are correctly declared.
Link copied to clipboard
Asserts that the given MethodLink has the correct return type.
Link copied to clipboard
Link copied to clipboard
Asserts that the given FieldLink has the correct super type.
Link copied to clipboard
public static MethodLink assertCorrectThrows(MethodLink link, Array<Matcher<? super TypeLink>> matchers)
Asserts that the given MethodLink has the correct throws.
Link copied to clipboard
public static void assertCorrectTypeParameters<T extends Link>(T link, Array<Matcher<? super TypeVariable<? extends Object>>> matchers)
Asserts that the given Link has the correct type parameters.
Link copied to clipboard
Link copied to clipboard
public static EnumConstantLink assertHasEnumConstant(TypeLink link, Matcher<? super Stringifiable> matcher)
Asserts that the given EnumConstantLink exists in the enum of the given TypeLink.
Link copied to clipboard
public static MethodLink assertImplementsInterfaceMethod(TypeLink link, MethodLink interfaceMethod, boolean strict)
Asserts that an interface method is implemented in the given TypeLink.
Link copied to clipboard
Assert that a method with the given characteristics exists in the given TypeLink.
Link copied to clipboard
public static void assertSameSignature<T extends MethodLink>(T expected, T actual, boolean verifyTypeParameters, Array<Modifier> ignoredModifiers)
Asserts that the given MethodLink has the same signature as the given MethodLink.
Link copied to clipboard
public static TypeLink assertTypeExists(PackageLink linkToPackage, Matcher<? super TypeLink> matcher)
Asserts that the given TypeLink exists in the given PackageLink.