Package org.apache.karaf.instance.core

Examples of org.apache.karaf.instance.core.InstancesMBean


       
        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.createInstance("t1", instanceSettings, false)).andReturn(null);
        EasyMock.replay(instanceService);
       
        InstancesMBean ab = new InstancesMBeanImpl(instanceService);
        assertEquals(-1, ab.createInstance("t1", 0, 0, 0, "", "", "", ""));
    }
View Full Code Here


        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);

        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);

        instanceServiceMBean.startInstance("test instance", "-x -y -z");
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);

        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);

        instanceServiceMBean.startInstance("test instance", null);
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);
       
        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);

        instanceServiceMBean.stopInstance("test instance");
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);
       
        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);

        instanceServiceMBean.destroyInstance("test instance");
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);
       
        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);

        instanceServiceMBean.changeSshPort("test instance", 7788);
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

       
        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);
       
        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);
       
        instanceServiceMBean.changeRmiRegistryPort("test instance", 1123);
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);

        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);

        instanceServiceMBean.changeRmiServerPort("test instance", 44444);
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(instanceService);

        InstancesMBean instanceServiceMBean = new InstancesMBeanImpl(instanceService);

        instanceServiceMBean.changeJavaOpts("test instance", "new opts");
        EasyMock.verify(instanceService);
        EasyMock.verify(inst);
    }
View Full Code Here

       
        InstanceService instanceService = EasyMock.createMock(InstanceService.class);
        EasyMock.expect(instanceService.createInstance("t1", instanceSettings, false)).andReturn(null);
        EasyMock.replay(instanceService);
       
        InstancesMBean ab = new Instances(instanceService);
        assertEquals(-1, ab.createInstance("t1", 0, 0, 0, "", "", "", ""));
    }
View Full Code Here

TOP

Related Classes of org.apache.karaf.instance.core.InstancesMBean

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.