Package org.apache.karaf.instance.command

Examples of org.apache.karaf.instance.command.InstanceCommandSupport


        p.store(fos, "");
        fos.close();

        final List<InstanceServiceImpl> instanceServices = new ArrayList<InstanceServiceImpl>();
        try {
            InstanceCommandSupport mockCommand = EasyMock.createStrictMock(InstanceCommandSupport.class);
            mockCommand.setInstanceService((InstanceService) EasyMock.anyObject());
            EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
                public Object answer() throws Throwable {
                    InstanceServiceImpl instanceService = (InstanceServiceImpl) EasyMock.getCurrentArguments()[0];
                    assertEquals(tempFile, instanceService.getStorageLocation());
                    instanceServices.add(instanceService);
                    return null;
                }
            });
           
            EasyMock.expect(mockCommand.execute(null)).andAnswer(new IAnswer<Object>() {
                public Object answer() throws Throwable {
                    // The Instances Service should be initialized at this point.
                    // One way to find this out is by reading out the port number
                    InstanceServiceImpl instanceService = instanceServices.get(0);
                    Field sshField = InstanceServiceImpl.class.getDeclaredField("defaultSshPortStart");
View Full Code Here

TOP

Related Classes of org.apache.karaf.instance.command.InstanceCommandSupport

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.