Examples of createBundleResource()


Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

        assertEquals(Bundle.INSTALLED, bundle.getState());

        dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
        dpBuilder.setFixPackage("[0.9,1.0)") // should not include version 1.0.0!
        .add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")).setMissing());

        try
        {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing fix package for undefined target package?!");
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

     */
    @Test
    public void testInstallFixPackageWithoutTargetFail() throws Exception
    {
        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")));

        try
        {
            installDeploymentPackage(dpBuilder);
            fail("Should not be able to install fix package without target?!");
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

     */
    @Test
    public void testInstallFixPackageWithoutTargetFail() throws Exception
    {
        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")));

        try
        {
            installDeploymentPackage(dpBuilder);
            fail("Should not be able to install fix package without target?!");
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

     */
    @Test
    public void testInstallFixPackageReplacesOriginalTargetPackageOk() throws Exception
    {
        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")));

        DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp1);

        assertEquals("Expected only a single deployment package?!", 1, countDeploymentPackages());
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

        assertEquals("Expected only a single deployment package?!", 1, countDeploymentPackages());

        awaitRefreshPackagesEvent();

        dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
        dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")).setMissing());

        DeploymentPackage dp2 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp2);

        awaitRefreshPackagesEvent();
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

        assertEquals("Expected only a single deployment package?!", 1, countDeploymentPackages());

        awaitRefreshPackagesEvent();

        dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
        dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")).setMissing());

        DeploymentPackage dp2 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp2);

        awaitRefreshPackagesEvent();
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

    @Test
    public void testInstallFixPackageWithMissingTargetBundleFail() throws Exception
    {
        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        // missed valid-bundle1 as dependency...
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1")));

        DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp1);

        assertEquals("Expected only a single deployment package?!", 1, countDeploymentPackages());
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

        assertEquals("Expected only a single deployment package?!", 1, countDeploymentPackages());

        awaitRefreshPackagesEvent();

        dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
        dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle3"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")).setMissing());

        try
        {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing a fix-package with a missing bundle on target?!");
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

        assertEquals("Expected only a single deployment package?!", 1, countDeploymentPackages());

        awaitRefreshPackagesEvent();

        dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
        dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle3"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")).setMissing());

        try
        {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing a fix-package with a missing bundle on target?!");
View Full Code Here

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()

     */
    @Test
    public void testInstallFixPackageWithMissingTargetResourceFail() throws Exception
    {
        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1")));

        DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp1);

        assertEquals("Expected only a single deployment package?!", 1, countDeploymentPackages());
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.