Package org.jboss.as.test.module.util

Examples of org.jboss.as.test.module.util.TestModule


        private TestModule createModule() throws IOException {
            File moduleXml = new File(JPAEMFFromModuleBasedPartitionManagerTestCase.class
                .getResource(JPAEMFFromModuleBasedPartitionManagerTestCase.class
                    .getSimpleName() + "-module.xml").getFile());

            TestModule module = new TestModule("test.picketlink-emf-module-test", moduleXml);

            module.addResource("picketlink-emf-module-test.jar")
                .addClass(CustomCredential.class)
                .addClass(CustomCredentialHandler.class)
                .addClass(AbstractCredentialTypeEntity.class)
                .addClass(AttributedTypeEntity.class)
                .addClass(AttributeTypeEntity.class)
                .addClass(GroupTypeEntity.class)
                .addClass(IdentityTypeEntity.class)
                .addClass(PartitionTypeEntity.class)
                .addClass(PasswordCredentialTypeEntity.class)
                .addClass(RelationshipIdentityTypeEntity.class)
                .addClass(RelationshipIdentityTypeReferenceEntity.class)
                .addClass(RelationshipTypeEntity.class)
                .addClass(RoleTypeEntity.class)
                .addClass(AccountEntity.class)
                .addAsManifestResource(new File(JPAEMFFromModuleBasedPartitionManagerTestCase.class
                    .getResource(JPAEMFFromModuleBasedPartitionManagerTestCase.class.getSimpleName() + "-persistence.xml")
                    .getFile()), "persistence.xml");

            module.create();

            return module;
        }
View Full Code Here


        private TestModule createModule() throws IOException {
            File moduleXml = new File(JPAEMFFromModuleBasedPartitionManagerTestCase.class
                .getResource(JPAEMFFromModuleBasedPartitionManagerTestCase.class
                    .getSimpleName() + "-module.xml").getFile());

            TestModule module = new TestModule("test.picketlink-emf-module-test", moduleXml);

            module.addResource("picketlink-emf-module-test.jar")
                .addClass(AbstractCredentialTypeEntity.class)
                .addClass(AttributedTypeEntity.class)
                .addClass(AttributeTypeEntity.class)
                .addClass(GroupTypeEntity.class)
                .addClass(IdentityTypeEntity.class)
                .addClass(PartitionTypeEntity.class)
                .addClass(PasswordCredentialTypeEntity.class)
                .addClass(RelationshipIdentityTypeEntity.class)
                .addClass(RelationshipIdentityTypeReferenceEntity.class)
                .addClass(RelationshipTypeEntity.class)
                .addClass(RoleTypeEntity.class)
                .addClass(AccountEntity.class)
                .addAsManifestResource(new File(JPAEMFFromModuleBasedPartitionManagerTestCase.class
                    .getResource(JPAEMFFromModuleBasedPartitionManagerTestCase.class.getSimpleName() + "-persistence.xml")
                    .getFile()), "persistence.xml");

            module.create();

            return module;
        }
View Full Code Here

public class ModuleUtils {

    private static final String[] EE_DEPENDENCIES = new String[] {"javax.enterprise.api", "javax.inject.api", "javax.servlet.api", "javax.servlet.jsp.api"};
    public static TestModule createTestModuleWithEEDependencies(String moduleName) {
        TestModule testModule = new TestModule("test." + moduleName, EE_DEPENDENCIES);
        return testModule;
    }
View Full Code Here

    private PortableExtensionLookup ejbInjectionTarget;

    public static void doSetup() throws Exception {
        URL url = PortableExtension.class.getResource(MODULE_NAME + "-module.xml");
        File moduleXmlFile = new File(url.toURI());
        testModule = new TestModule("test." + MODULE_NAME, moduleXmlFile);
        testModule.addResource("portable-extension.jar")
            .addClasses(PortableExtension.class, PortableExtensionLookup.class, PortableExtensionModuleLookup.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
        testModule.addClassCallback(ModuleUtils.ENTERPRISE_INJECT);
        testModule.create();
View Full Code Here

    public static void doSetup() throws Exception {
        tearDown();

        URL url = BuiltInBeanWithPackagePrivateConstructor.class.getResource("test-module.xml");
        File moduleXmlFile = new File(url.toURI());
        testModule = new TestModule("test.module-accessibility", moduleXmlFile);
        JavaArchive jar = testModule.addResource("module-accessibility.jar");
        jar.addClass(BuiltInBeanWithPackagePrivateConstructor.class);
        jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
        testModule.create(true);
View Full Code Here

     * Creates work-directory where JAR containing {@link org.jboss.as.test.integration.security.vault.ExternalPassword} is stored. The JAR is then deployed as an AS module.
     */
    @Override
    public void setup(ManagementClient managementClient, String containerId) throws Exception {
        LOGGER.info("Creating: " + getModuleName());
        testModule = new TestModule(getModuleName());
        testModule.addResource(MODULE_JAR).addClass(ExternalPassword.class);
        testModule.create();
    }
View Full Code Here

    }

    private static void addModule(String moduleName, String moduleXml, Class<?> beanType, Class<?> lookupType) throws Exception {
        URL url = beanType.getResource(moduleXml);
        File moduleXmlFile = new File(url.toURI());
        TestModule testModule = new TestModule("test." + moduleName, moduleXmlFile);
        JavaArchive jar = testModule.addResource(moduleName + ".jar");
        jar.addClass(beanType);
        jar.addClass(lookupType);
        jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
        testModules.add(testModule);
        testModule.create(true);
    }
View Full Code Here

    private static final List<TestModule> testModules = new ArrayList<>();

    public static void doSetup() throws Exception {
        URL url = MultipleJarInModuleTestCase.class.getResource("multiple-module.xml");
        File moduleXmlFile = new File(url.toURI());
        TestModule testModule = new TestModule("test.multiple", moduleXmlFile);
        JavaArchive jar = testModule.addResource("m1.jar");
        jar.addClass(Multiple1.class);
        jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
        jar = testModule.addResource("m2.jar");
        jar.addClass(Multiple2.class);
        jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
        testModules.add(testModule);
        testModule.create(true);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.test.module.util.TestModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.