Class TestApplication

  • All Implemented Interfaces:
    org.tentackle.pdo.DomainContextProvider, org.tentackle.session.SessionProvider

    public abstract class TestApplication
    extends org.tentackle.app.AbstractApplication
    Base class for tests that must run as an application.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      TestApplication​(java.lang.String name)
      Creates a test application.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.tentackle.pdo.DomainContext getDomainContext()  
      <U extends org.tentackle.pdo.PersistentDomainObject<U>>
      U
      getUser​(org.tentackle.pdo.DomainContext context, long userId)  
      boolean isServer()  
      void setUpClass()  
      protected void startup()  
      void tearDownClass()  
      • Methods inherited from class org.tentackle.app.AbstractApplication

        cleanup, configure, configureModificationTracker, configurePreferences, configureSecurityManager, createDomainContext, createSession, createSessionInfo, finishStartup, getCommandLine, getCreationTime, getName, getProperties, getProperty, getRunningApplication, getSession, getSessionInfo, getUser, initialize, isSystemExitNecessaryToStop, logStackdump, register, setDomainContext, setName, setProperties, setSessionInfo, start, start, stop, stop, toString, unregister
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.tentackle.pdo.DomainContextProvider

        on, op
    • Constructor Detail

      • TestApplication

        public TestApplication​(java.lang.String name)
        Creates a test application.
        Parameters:
        name - the application name
    • Method Detail

      • setUpClass

        @BeforeClass(alwaysRun=true)
        public void setUpClass()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • tearDownClass

        @AfterClass(alwaysRun=true)
        public void tearDownClass()
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDomainContext

        public org.tentackle.pdo.DomainContext getDomainContext()
        Specified by:
        getDomainContext in interface org.tentackle.pdo.DomainContextProvider
        Overrides:
        getDomainContext in class org.tentackle.app.AbstractApplication
      • isServer

        public boolean isServer()
        Specified by:
        isServer in class org.tentackle.app.AbstractApplication
      • startup

        protected void startup()
        Specified by:
        startup in class org.tentackle.app.AbstractApplication
      • getUser

        public <U extends org.tentackle.pdo.PersistentDomainObject<U>> U getUser​(org.tentackle.pdo.DomainContext context,
                                                                                 long userId)
        Specified by:
        getUser in class org.tentackle.app.AbstractApplication