Assertions3

public class Assertions3(source)

The Assertions3 class is a collection of test utils for verifying the declarations of classes, methods, fields, etc.

Constructors

Link copied to clipboard
public void Assertions3()

Functions

Link copied to clipboard
Assert that a constructor with the given characteristics exists in the given TypeLink.
Link copied to clipboard
public static TypeLink assertCorrectInterfaces(TypeLink link, Array<Class<? extends Object>> types)
public static TypeLink assertCorrectInterfaces(TypeLink link, Array<Matcher<? super TypeLink>> matchers)
public static TypeLink assertCorrectInterfaces(TypeLink link, Array<TypeLink> types)
Asserts that the given FieldLink implements the given interfaces.
Link copied to clipboard
public static T assertCorrectModifiers<T extends WithModifiers>(T link, Array<Modifier> attributes)
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
public static MethodLink assertCorrectReturnType(MethodLink link, Class<? extends Object> type)
Asserts that the given MethodLink has the correct return type.
Link copied to clipboard
public static FieldLink assertCorrectStaticType(FieldLink link, Matcher<? super FieldLink> matcher)
Asserts that the given FieldLink has the correct static type.
Link copied to clipboard
public static TypeLink assertCorrectSuperType(TypeLink link, Class<? extends Object> type)
public static TypeLink assertCorrectSuperType(TypeLink link, Matcher<? super TypeLink> matcher)
public static TypeLink assertCorrectSuperType(TypeLink link, TypeLink type)
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
public static FieldLink assertFieldExists(TypeLink link, Matcher<? super FieldLink> matcher)
Assert that a field with the given characteristics exists in the given TypeLink.
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)
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
public static MethodLink assertMethodExists(TypeLink link, Matcher<? super MethodLink> matcher)
Assert that a method with the given characteristics exists in the given TypeLink.
Link copied to clipboard
public void assertSameSignature(MethodLink expected, MethodLink actual)
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, String name)
public static TypeLink assertTypeExists(PackageLink linkToPackage, Matcher<? super TypeLink> matcher)
Asserts that the given TypeLink exists in the given PackageLink.