Package org.apache.felix.scr

Examples of org.apache.felix.scr.Component.disable()


        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );
        TestCase.assertNotNull( SimpleComponent.INSTANCE );
        TestCase.assertNull( SimpleComponent.INSTANCE.getProperty( PROP_NAME ) );

        component.disable();
        delay();

        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );
    }
View Full Code Here


        TestCase.assertNotSame( "Expect new instance object after configuration deletion (1)", firstInstance,
            thirdInstance );
        TestCase.assertNotSame( "Expect new instance object after configuration deletion (2)", secondInstance,
            thirdInstance );

        component.disable();
        delay();

        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );
    }
View Full Code Here

        delay();

        TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );

        component.disable();
        delay();

        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );
    }
View Full Code Here

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );
        TestCase.assertSame( instance, SimpleComponent.INSTANCE );
        TestCase.assertNull( SimpleComponent.INSTANCE.getProperty( PROP_NAME ) );
        TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) );

        component.disable();
        delay();

        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
        TestCase.assertNull( SimpleComponent.INSTANCE );
    }
View Full Code Here

            delay();

            // mandatory ref missing --> component unsatisfied
            TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );

            component.disable();
            delay();

            TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
            TestCase.assertNull( SimpleComponent.INSTANCE );
        }
View Full Code Here

            delay();

            // mandatory ref missing --> component unsatisfied
            TestCase.assertEquals( Component.STATE_UNSATISFIED, component.getState() );

            component.disable();
            delay();

            TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
            TestCase.assertNull( SimpleComponent.INSTANCE );
        }
View Full Code Here

            // optional ref missing --> component active
            TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );
            TestCase.assertEquals( instance, SimpleComponent.INSTANCE );
            TestCase.assertNull( SimpleComponent.INSTANCE.m_singleRef );

            component.disable();
            delay();

            TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
            TestCase.assertNull( SimpleComponent.INSTANCE );
        }
View Full Code Here

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        ActivatorComponent ac = (ActivatorComponent) component.getComponentInstance().getInstance();
        TestCase.assertNotNull( ac.getSimpleService() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
View Full Code Here

        ActivatorComponent ac = bundleContext.getService( ref );
        TestCase.assertNotNull( ac.getSimpleService() );

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
   
View Full Code Here

        ActivatorComponent ac = bundleContext.getService( ref );
        TestCase.assertNotNull( ac.getSimpleService() );

        TestCase.assertEquals( Component.STATE_ACTIVE, component.getState() );

        component.disable();

        delay();
        TestCase.assertEquals( Component.STATE_DISABLED, component.getState() );
    }
   
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.