Package org.apache.felix.ipojo.handler.eventadmin.test.donut

Examples of org.apache.felix.ipojo.handler.eventadmin.test.donut.DonutConsumer


        ComponentInstance consumerInstance = consumerFactory
                .createComponentInstance(properties);
        ServiceReference consumerService = ipojoHelper
                .getServiceReferenceByName(DonutConsumer.class
                        .getName(), consumerInstance.getInstanceName());
        DonutConsumer consumer = (DonutConsumer) bc
                .getService(consumerService);

        /**
         * Test the normal behaviour of the instances.
         */
        consumer.clearDonuts();
        Donut sentDonut = provider.sellDonut();
        Donut receivedDonut = consumer.waitForDonut();
        assertEquals("The received donut must be the same as the sent one.",
                sentDonut, receivedDonut);

        /**
         * Destroy component's instances.
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.handler.eventadmin.test.donut.DonutConsumer

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.