Examples of discoverDeployedPackages()


Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

        when(mockConfiguration.getSimpleValue(eq("filename"), isNull(String.class))).thenReturn(
            fileUsedInTest.getAbsolutePath());

        PackageType mockPackageType = mock(PackageType.class);

        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

        //run code under test
        Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

        //verify the results (Assert and mock verification)
View Full Code Here

Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

        PackageType mockPackageType = mock(PackageType.class);

        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

        //run code under test
        Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

        //verify the results (Assert and mock verification)
        Assert.assertEquals(actualResult.size(), 1);

        ResourcePackageDetails actualResourcePackageDetails = (ResourcePackageDetails) actualResult.toArray()[0];
View Full Code Here

Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

            when(mockConfiguration.getSimpleValue(eq("filename"), isNull(String.class))).thenReturn(
                deploymentFolderUsedInTest.getAbsolutePath());

            PackageType mockPackageType = mock(PackageType.class);

            when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

            //run code under test
            Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

            //verify the results (Assert and mock verification)
View Full Code Here

Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

            PackageType mockPackageType = mock(PackageType.class);

            when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

            //run code under test
            Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

            //verify the results (Assert and mock verification)
            Assert.assertEquals(actualResult.size(), 1);

            ResourcePackageDetails actualResourcePackageDetails = (ResourcePackageDetails) actualResult.toArray()[0];
View Full Code Here

Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

        when(mockConfiguration.getSimpleValue(eq("filename"), isNull(String.class))).thenReturn(
            fileUsedInTest.getAbsolutePath());

        PackageType mockPackageType = mock(PackageType.class);

        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

        //run code under test
        Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

        //verify the results (Assert and mock verification)
View Full Code Here

Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

        PackageType mockPackageType = mock(PackageType.class);

        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

        //run code under test
        Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

        //verify the results (Assert and mock verification)
        Assert.assertEquals(actualResult.size(), 0);

        verify(mockResourceContext, times(1)).getPluginConfiguration();
View Full Code Here

Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

        when(mockResourceContext.getPluginConfiguration()).thenReturn(mockConfiguration);
        when(mockConfiguration.getSimpleValue(eq("filename"), isNull(String.class))).thenReturn(null);

        PackageType mockPackageType = mock(PackageType.class);

        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

        //run code under test
        Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

        //verify the results (Assert and mock verification)
View Full Code Here

Examples of org.jboss.on.plugins.tomcat.TomcatWarComponent.discoverDeployedPackages()

        PackageType mockPackageType = mock(PackageType.class);

        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

        //run code under test
        Set<ResourcePackageDetails> actualResult = objectUnderTest.discoverDeployedPackages(mockPackageType);

        //verify the results (Assert and mock verification)
        Assert.assertEquals(actualResult.size(), 0);

        verify(mockResourceContext, times(1)).getPluginConfiguration();
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentFacet.discoverDeployedPackages()

        // Perform the discovery
        // Use only a read-locked component proxy
        ContentFacet contentFacet = ComponentUtil.getComponent(resourceId, ContentFacet.class, FacetLockType.READ,
            FACET_METHOD_TIMEOUT, false, true, false);

        Set<ResourcePackageDetails> details = contentFacet.discoverDeployedPackages(type);

        if (LOG.isDebugEnabled()) {
            LOG.debug("Discovered [" + ((details != null) ? details.size() : 0) + "] packages of type=" + type);
        }
View Full Code Here

Examples of org.rhq.core.pluginapi.content.FileContentDelegate.discoverDeployedPackages()

    public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
        FileContentDelegate contentDelegate = getContentDelegate(type);

        Set<ResourcePackageDetails> details = null;
        if (contentDelegate != null) {
            details = contentDelegate.discoverDeployedPackages();
        }

        return details;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.