Class TreeUnitTestHelper
java.lang.Object
com.madzera.happytree.core.TreeUnitTestHelper
The class
TreeUnitTestHelper is a helper class to provide
access to internal methods of the core package for JUnit tests purposes.- Author:
- Diego Madson de Andrade Nóbrega
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanexecuteInternalMethod(String fqn, String method) This method helps HappyTree API to cover code blocks that is not accessible from outside for JUnit tests purposes.
-
Method Details
-
executeInternalMethod
public static boolean executeInternalMethod(String fqn, String method) throws ReflectiveOperationException This method helps HappyTree API to cover code blocks that is not accessible from outside for JUnit tests purposes.
The test must provide the fully qualified name of the class and the method name to be tested. This only works for methods with no parameters.
- Parameters:
fqn- fully qualified name of the classmethod- representing the method name- Returns:
- the boolean result of the method execution
- Throws:
ReflectiveOperationException- if any reflection error occurs
-