Package org.rhq.plugins.perftest.content

Examples of org.rhq.plugins.perftest.content.ContentFactory


        artifactType2.setCategory(PackageCategory.CONFIGURATION);

        // Test
        ScenarioManager manager = ScenarioManager.getInstance();

        ContentFactory artifactFactory;

        // Type: artifact1
        artifactFactory = manager.getContentFactory("server-a", "artifact1");

        assert artifactFactory != null : "Null artifact factory for artifact1";

        Set<ResourcePackageDetails> artifacts = artifactFactory.discoverContent(artifactType1);

        assert artifacts != null : "Null set of artifacts returned from factory for artifact1";
        assert artifacts.size() == 5 : "Incorrect number of artifacts returned from factory for artifact1. Expected: 5, Found: "
            + artifacts.size();

        ResourcePackageDetails packageDetails = artifacts.iterator().next();

        // Type: artifact2
        artifactFactory = manager.getContentFactory("server-a", "artifact2");

        assert artifactFactory != null : "Null artifact factory for artifact2";

        artifacts = artifactFactory.discoverContent(artifactType2);

        assert artifacts != null : "Null set of artifacts returned from factory for artifact2";
        assert artifacts.size() == 1 : "Incorrect number of artifacts returned from factory for artifact2. Expected: 1, Found: "
            + artifacts.size();
View Full Code Here


     *
     * @return factory used for discovery; this may be <code>null</code> if the scenario does not define a generator for
     *         a particular type
     */
    public ContentFactory getContentFactory(String resourceTypeName, String packageTypeName) {
        ContentFactory contentFactory = contentFactories.get(packageTypeName);

        // Lazy load the factory
        if (contentFactory == null) {
            Resource resource = findResource(resourceTypeName);
            if (resource != null) {
View Full Code Here

TOP

Related Classes of org.rhq.plugins.perftest.content.ContentFactory

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.