Class AbstractPolyglotProcedureTest

  • All Implemented Interfaces:
    junit.framework.Test

    public abstract class AbstractPolyglotProcedureTest
    extends OfficeFrameTestCase
    Abstract tests for a polyglot Procedure via a SectionSource.
    Author:
    Daniel Sagenschneider
    • Field Detail

      • mapper

        protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
        ObjectMapper.
    • Constructor Detail

      • AbstractPolyglotProcedureTest

        public AbstractPolyglotProcedureTest()
    • Method Detail

      • tearDown

        protected void tearDown()
                         throws java.lang.Exception
        Overrides:
        tearDown in class junit.framework.TestCase
        Throws:
        java.lang.Exception
      • isSupportExceptions

        protected boolean isSupportExceptions()
        Some languages do not provide exceptions.
        Returns:
        true if support Exception.
      • testDirectPrimitives

        public void testDirectPrimitives()
                                  throws java.lang.Exception
        Ensure can use primitive types.
        Throws:
        java.lang.Exception
      • primitives

        protected abstract PrimitiveTypes primitives​(boolean _boolean,
                                                     byte _byte,
                                                     short _short,
                                                     char _char,
                                                     int _int,
                                                     long _long,
                                                     float _float,
                                                     double _double)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testPrimitivesType

        public void testPrimitivesType()
        Ensure correct ProcedureType.
      • testInvokePrimitives

        public void testInvokePrimitives()
                                  throws java.lang.Throwable
        Ensure can invoke primitive types.
        Throws:
        java.lang.Throwable
      • testDirectObject

        public void testDirectObject()
                              throws java.lang.Exception
        Ensure can pass in a Java object.
        Throws:
        java.lang.Exception
      • objects

        protected abstract ObjectTypes objects​(java.lang.String string,
                                               JavaObject object,
                                               int[] primitiveArray,
                                               JavaObject[] objectArray)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testObjectType

        public void testObjectType()
        Ensure correct ProcedureType.
      • testInvokeObject

        public void testInvokeObject()
                              throws java.lang.Throwable
        Ensure can invoke object types.
        Throws:
        java.lang.Throwable
      • testDirectCollections

        public void testDirectCollections()
                                   throws java.lang.Exception
        Ensure can pass collections.
        Throws:
        java.lang.Exception
      • collections

        protected abstract CollectionTypes collections​(java.util.List<java.lang.Integer> list,
                                                       java.util.Set<java.lang.Character> set,
                                                       java.util.Map<java.lang.String,​JavaObject> map)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testCollectionsType

        public void testCollectionsType()
        Ensure correct ProcedureType.
      • testInvokeCollections

        public void testInvokeCollections()
                                   throws java.lang.Throwable
        Ensure can invoke collections.
        Throws:
        java.lang.Throwable
      • testDirectVariables

        public void testDirectVariables()
                                 throws java.lang.Exception
        Ensure can handle variables.
        Throws:
        java.lang.Exception
      • variables

        protected abstract VariableTypes variables​(char val,
                                                   In<java.lang.String> in,
                                                   Out<JavaObject> out,
                                                   Var<java.lang.Integer> var)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testVariablesType

        public void testVariablesType()
        Ensure correct ProcedureType.
      • testInvokeVariables

        public void testInvokeVariables()
                                 throws java.lang.Throwable
        Ensure can using variables.
        Throws:
        java.lang.Throwable
      • testDirectParameter

        public void testDirectParameter()
                                 throws java.lang.Exception
        Ensure can provide Parameter.
        Throws:
        java.lang.Exception
      • parameter

        protected abstract ParameterTypes parameter​(java.lang.String parameter)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testParameterType

        public void testParameterType()
        Ensure correct ProcedureType.
      • testInvokeParameter

        public void testInvokeParameter()
                                 throws java.lang.Throwable
        Ensure can use parameter.
        Throws:
        java.lang.Throwable
      • testDirectMultiThreaded

        public void testDirectMultiThreaded()
                                     throws java.lang.Exception
        Ensure safe to run directly multi-threaded.
        Throws:
        java.lang.Exception
      • testInvokeMultiThreaded

        public void testInvokeMultiThreaded()
                                     throws java.lang.Throwable
        Ensure safe to run invoked multi-threaded.
        Throws:
        java.lang.Throwable
      • testDirectWeb

        public void testDirectWeb()
                           throws java.lang.Exception
        Ensure can run direct for web.
        Throws:
        java.lang.Exception
      • web

        protected abstract void web​(java.lang.String pathParameter,
                                    java.lang.String queryParameter,
                                    java.lang.String headerParameter,
                                    java.lang.String cookieParameter,
                                    MockHttpParameters httpParameters,
                                    MockHttpObject httpObject,
                                    ObjectResponse<WebTypes> response)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testInvokeWeb

        public void testInvokeWeb()
                           throws java.lang.Throwable
        Ensure can invoke for web.
        Throws:
        java.lang.Throwable
      • testDirectHttpException

        public void testDirectHttpException()
                                     throws java.lang.Throwable
        Ensure can run direct for HttpException.
        Throws:
        java.lang.Throwable
      • httpException

        protected abstract void httpException()
                                       throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • testHttpExceptionType

        public void testHttpExceptionType()
        Ensure correct ProcedureType.
      • testInvokeHttpException

        public void testInvokeHttpException()
                                     throws java.lang.Throwable
        Ensure can invoke to handle HttpException.
        Throws:
        java.lang.Throwable
      • testFlowType

        public void testFlowType()
        Ensure correct ProcedureType.
      • testFlow

        public void testFlow()
                      throws java.lang.Throwable
        Ensure can invoke flow.
        Throws:
        java.lang.Throwable
      • testDirectAsynchronousFlow

        public void testDirectAsynchronousFlow()
                                        throws java.lang.Throwable
        Validate direct AsynchronousFlow.
        Throws:
        java.lang.Throwable
      • asynchronousFlow

        protected abstract void asynchronousFlow​(AsynchronousFlow flowOne,
                                                 AsynchronousFlow flowTwo)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testAsynchronousFlowType

        public void testAsynchronousFlowType()
        Ensure correct ProcedureType.
      • testInvokeAsynchronousFlow

        public void testInvokeAsynchronousFlow()
                                        throws java.lang.Throwable
        Ensure can invoke AsynchronousFlow.
        Throws:
        java.lang.Throwable