Examples of listConfigurations()


Examples of org.osgi.service.cm.ConfigurationAdmin.listConfigurations()

    @Test
    public void testConfigurationLocationChangedEventNoEffect() throws Exception {
        String testPid = SecuredCommandConfigTransformer.PROXY_COMMAND_ACL_PID_PREFIX + "test123";

        ConfigurationAdmin cm = EasyMock.createMock(ConfigurationAdmin.class);
        EasyMock.expect(cm.listConfigurations(EasyMock.isA(String.class))).andReturn(null).anyTimes();
        EasyMock.replay(cm);

        SecuredCommandConfigTransformer scct = new SecuredCommandConfigTransformer();
        scct.setConfigAdmin(cm);
        scct.init();
View Full Code Here

Examples of org.osgi.service.cm.ConfigurationAdmin.listConfigurations()

        Configuration otherConfig = mockConfiguration(props3);

        final Map<String, Configuration> configurations = new HashMap<String, Configuration>();

        ConfigurationAdmin ca = EasyMock.createMock(ConfigurationAdmin.class);
        EasyMock.expect(ca.listConfigurations(
                "(service.pid=" + SecuredCommandConfigTransformer.PROXY_COMMAND_ACL_PID_PREFIX + "*)")).
                andReturn(new Configuration [] {commandConfig, commandConfig2, otherConfig}).anyTimes();
        EasyMock.expect(ca.getConfiguration(EasyMock.isA(String.class))).andAnswer(new IAnswer<Configuration>() {
            @Override
            public Configuration answer() throws Throwable {
View Full Code Here

Examples of org.osgi.service.cm.ConfigurationAdmin.listConfigurations()

        Configuration conf = EasyMock.createMock(Configuration.class);
        EasyMock.expect(conf.getPid()).andReturn(testPid).anyTimes();
        EasyMock.replay(conf);

        ConfigurationAdmin cm = EasyMock.createMock(ConfigurationAdmin.class);
        EasyMock.expect(cm.listConfigurations(EasyMock.isA(String.class))).andReturn(null).anyTimes();
        EasyMock.expect(cm.getConfiguration(testPid)).andReturn(conf).anyTimes();
        EasyMock.replay(cm);

        final List<String> generateCalled = new ArrayList<String>();
        SecuredCommandConfigTransformer scct = new SecuredCommandConfigTransformer() {
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.