Package org.osgi.service.component.runtime.dto

Examples of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO


    public void test_required_single_static() throws Exception
    {
        final SimpleServiceImpl srv1 = SimpleServiceImpl.create( bundleContext, "srv1" );

        String name ="test_required_single_static";
        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(name, ComponentConfigurationDTO.ACTIVE);

        final SimpleComponent comp10 = SimpleComponent.INSTANCE;
        TestCase.assertNotNull( comp10 );
        TestCase.assertEquals( srv1, comp10.m_singleRef );
        TestCase.assertTrue( comp10.m_multiRef.isEmpty() );
View Full Code Here


    public void test_optional_multiple_static() throws Exception
    {
        final SimpleServiceImpl srv1 = SimpleServiceImpl.create( bundleContext, "srv1" );

        String name ="test_optional_multiple_static";
        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(name, ComponentConfigurationDTO.ACTIVE);

        final SimpleComponent comp10 = SimpleComponent.INSTANCE;
        TestCase.assertNotNull( comp10 );
        TestCase.assertNull( comp10.m_singleRef );
        TestCase.assertTrue( comp10.m_multiRef.contains( srv1 ) );
View Full Code Here

    public void test_required_multiple_static() throws Exception
    {
        final SimpleServiceImpl srv1 = SimpleServiceImpl.create( bundleContext, "srv1" );

        String name ="test_required_multiple_static";
        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(name, ComponentConfigurationDTO.ACTIVE);

        final SimpleComponent comp10 = SimpleComponent.INSTANCE;
        TestCase.assertNotNull( comp10 );
        TestCase.assertNull( comp10.m_singleRef );
        TestCase.assertTrue( comp10.m_multiRef.contains( srv1 ) );
View Full Code Here

    {
        final SimpleServiceImpl srv1 = SimpleServiceImpl.create( bundleContext, "srv1" );
        final SimpleService2Impl srv2 = SimpleService2Impl.create( bundleContext, "srv2" );

        String name ="test_multi_service_bind_unbind_order";
        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(name, ComponentConfigurationDTO.ACTIVE);

        final SimpleComponent2 comp10 = SimpleComponent2.INSTANCE;
        TestCase.assertNotNull( comp10 );
        TestCase.assertEquals( 2, comp10.getBindings().size() );
        TestCase.assertEquals( "bindSimpleService", comp10.getBindings().get( 0 ) );
View Full Code Here

        for ( ComponentDescriptionDTO component : components )
        {
            TestCase.assertTrue( "Expecting component " + component.name + " to be enabled", component
                .defaultEnabled );

            ComponentConfigurationDTO cc = findComponentConfigurationByName(component.name, -1);
            TestCase.assertEquals( "Expecting component " + component.name + " to be active",
                ComponentConfigurationDTO.ACTIVE, cc.state );
           
            TestCase.assertNotNull("Expect activate method to be called", AbstractActivateSignatureTestComponent.getInstance(component.name));
View Full Code Here

    @Test
    public void test_activator_not_declared() throws Exception
    {
        final String componentname = "ActivatorComponent.no.decl";

        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.ACTIVE);

        disableAndCheck( cc );
    }
View Full Code Here

    public void test_activate_missing() throws Exception
    {
        final String componentname = "ActivatorComponent.activate.missing";

        // activate must fail, so state remains SATISFIED
        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.SATISFIED);

        disableAndCheck( cc );
    }
View Full Code Here

    @Test
    public void test_deactivate_missing() throws Exception
    {
        final String componentname = "ActivatorComponent.deactivate.missing";

        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.ACTIVE);

        disableAndCheck( cc );
    }
View Full Code Here

    @Test
    public void test_activator_declared() throws Exception
    {
        final String componentname = "ActivatorComponent.decl";

        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.ACTIVE);

        disableAndCheck( cc );
    }
View Full Code Here

    public void test_activate_fail() throws Exception
    {
        final String componentname = "ActivatorComponent.activate.fail";

        // activate must fail, so state remains SATISFIED
        ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.SATISFIED);

        disableAndCheck( cc );
    }
View Full Code Here

TOP

Related Classes of org.osgi.service.component.runtime.dto.ComponentConfigurationDTO

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.