Class TestUtils

  • All Implemented Interfaces:
    Serializable, org.qdl_lang.extensions.QDLMetaModule

    public class TestUtils
    extends Object
    implements org.qdl_lang.extensions.QDLMetaModule
    This is mostly for testing. It allows access to utilities the server uses to verify that certain operations are done right, such as computing token lifetimes.

    Created by Jeff Gaynor
    on 3/11/24 at 7:33 AM

    See Also:
    Serialized Form
    • Constructor Detail

      • TestUtils

        public TestUtils()
    • Method Detail

      • serializeToJSON

        public net.sf.json.JSONObject serializeToJSON()
        Specified by:
        serializeToJSON in interface org.qdl_lang.extensions.QDLMetaModule
      • deserializeFromJSON

        public void deserializeFromJSON​(net.sf.json.JSONObject json)
        Specified by:
        deserializeFromJSON in interface org.qdl_lang.extensions.QDLMetaModule
      • getClientCfgLifetime

        protected Long getClientCfgLifetime​(org.qdl_lang.variables.QDLStem client,
                                            String handlerName)
      • checkArgs

        protected long checkArgs​(org.qdl_lang.variables.values.QDLValue[] objects,
                                 String name)
        Checks that the first two elements are stems and if a 3 arg array, returns the last as a long or the OA2Client.USE_SERVER_DEFAULT.
        Parameters:
        objects -
        name -
        Returns:
      • getLifetimeDoc

        protected List<String> getLifetimeDoc​(String name,
                                              int argCount)