Class WeldBaseTest

    • Constructor Detail

      • WeldBaseTest

        public WeldBaseTest()
    • Method Detail

      • createTestArchive

        @Deployment
        public static org.jboss.shrinkwrap.api.spec.JavaArchive createTestArchive()
      • setUp

        public void setUp()
                   throws Exception
        Sets static instance bean manager in WeldUtils so it is globally accessible and initializes kernel. Arquillian creates a new cdi container for each test class but keeps existent one for all tests within same class, let's initialize it once per class but we cannot use @BeforeClass at this point because we require of beanManager to be injected.
        Overrides:
        setUp in class OBBaseTest
        Throws:
        Exception
      • resetOBInterceptors

        public static void resetOBInterceptors()
        Once we are done with the class execution, OBInterceptor needs to be reset other case when executing a suite it will reuse the container created for the previous classes instead of the new one.
      • getWeldComponent

        protected <U> U getWeldComponent​(Class<U> clz)