Class ATPUnitTestHelper

java.lang.Object
com.madzera.happytree.core.atp.ATPUnitTestHelper

public class ATPUnitTestHelper extends Object
The class ATPUnitTestHelper is a helper class to provide access to internal methods of the ATP package for JUnit tests purposes.
Author:
Diego Madson de Andrade Nóbrega
  • 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 class
      method - representing the method name
      Returns:
      the boolean result of the method execution
      Throws:
      ReflectiveOperationException - if any reflection error occurs