Package org.apache.felix.ipojo.test.scenarios.lfc.service

Examples of org.apache.felix.ipojo.test.scenarios.lfc.service.CheckService.check()


       
        // The conf is correct, the PS must be provided
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -1", ref);
        CheckService cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 1", cs.check());
        getContext().ungetService(ref);
        cs = null;
       
        // Reconfigure the instance with a bad configuration
        props.put("conf", "bar"); // Bar is a bad conf
View Full Code Here


        }
       
        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -3", ref);
        cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 2", cs.check());
        getContext().ungetService(ref);
        cs = null;
       
        under.dispose();
    }
View Full Code Here

        }
       
        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under2");
        assertNotNull("Check service availability -2", ref);
        CheckService cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state ", cs.check());
        getContext().ungetService(ref);
        cs = null;
       
        under.dispose();
    }
View Full Code Here

        // The conf is correct, the PS must be provided
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -1", ref);
        CheckService cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 1", cs.check());
        getContext().ungetService(ref);
        cs = null;

        // Reconfigure the instance
        props.put("state", "false"); // Bar is a bad conf
View Full Code Here

        }

        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -3", ref);
        cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 2", cs.check());
        getContext().ungetService(ref);
        cs = null;

        under.dispose();
    }
View Full Code Here

//        }

        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -1", ref);
        CheckService cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 1", cs.check());
        getContext().ungetService(ref);
        cs = null;

        // Reconfigure the instance
        props.put("state", "false"); // Bar is a bad conf
View Full Code Here

        }

        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -3", ref);
        cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 2", cs.check());
        getContext().ungetService(ref);
        cs = null;

        under.dispose();
    }
View Full Code Here

        // The conf is correct, the PS must be provided
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -1", ref);
        CheckService cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 1", cs.check());
        getContext().ungetService(ref);
        cs = null;

        // Reconfigure the instance with a bad configuration
        props.put("conf", "bar"); // Bar is a bad conf
View Full Code Here

        }

        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -3", ref);
        cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 2", cs.check());
        getContext().ungetService(ref);
        cs = null;

        under.dispose();
    }
View Full Code Here

        System.out.println("CS received : " + getContext().getService(ref));
        CheckService cs = (CheckService) getContext().getService(ref);
        assertNotNull("Assert CS not null", cs);
        try {
            assertFalse("Check state (false)", cs.check());
        } catch (Throwable e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
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.