Package org.rhq.plugins.jbossas

Examples of org.rhq.plugins.jbossas.ApplicationComponent.discoverDeployedPackages()


        PowerMockito.whenNew(JarContentFileInfo.class).withParameterTypes(File.class).withArguments(any(File.class))
            .thenReturn(mockJarContentFileInfo);
        when(mockJarContentFileInfo.getVersion(isNull(String.class))).thenReturn("testDisplayVersion");

        //create object to test and inject required dependencies
        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

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

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


        //create object to test and inject required dependencies
        when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();

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

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

        ResourcePackageDetails resultPackageDetails = (ResourcePackageDetails) result.toArray()[0];
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.