Examples of TestComponent


Examples of org.apache.fulcrum.yaafi.TestComponent

    /**
     * Create an exception which should be handled by the JAMon interceptor.
     */
    public void testException() throws Exception
    {
      TestComponent testComponent = (TestComponent) container.lookup(
          TestComponent.ROLE
          );

      try
      {
          testComponent.createException("testException", this);
      }
      catch(Exception e)
      {
          return;
      }
View Full Code Here

Examples of org.apache.fulcrum.yaafi.TestComponent

    }

    private void checkTestComponent()
        throws Exception
    {
        TestComponent testComponent = this.getTestComponent();

        testComponent.test();

        assertEquals( testComponent.getBar(), "BAR" );
        assertEquals( testComponent.getFoo(), "FOO" );

        assertNotNull( testComponent.getUrnAvalonClassLoader() );
        assertNotNull( testComponent.getUrnAvaloneHome() );
        assertNotNull( testComponent.getUrnAvaloneTemp() );
        assertNotNull( testComponent.getUrnAvalonName() );
        assertNotNull( testComponent.getUrnAvalonPartition() );

        try
        {
            testComponent.createException("enforce exception", this);
        }
        catch( Exception e )
        {
            // nothing to do
        }
View Full Code Here

Examples of org.apache.fulcrum.yaafi.TestComponent

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        Configuration configuration = builder.buildFromFile( "./src/test/TestReconfigurationConfig.xml" );
        System.out.println(ConfigurationUtil.toString(configuration));

        this.container.reconfigure( configuration );
        TestComponent testComponent = this.getTestComponent();
        testComponent.test();

        // the TestReconfigurationConfig.xml overwrites the
        // TestComponentImpl.foo and the SystemProperty.FOO

        assertEquals( System.getProperty("FOO"), "YAAFI" );
        assertEquals( testComponent.getFoo(), "YAAFI" );

    }
View Full Code Here

Examples of org.apache.servicemix.jbi.messaging.DeliveryChannelImplTest.TestComponent

            assertTrue(srv.isInitialized());
        }
    }

    private ServiceEndpoint registerEndpoint() throws JBIException {
        TestComponent component = new TestComponent(SERVICE, ENDPOINT);
        container.activateComponent(new ActivationSpec(COMPONENT, component));
        return container.getEndpoint((ComponentContextImpl)component.getContext(), SERVICE, ENDPOINT);
    }
View Full Code Here

Examples of org.apache.turbine.test.TestComponent

        try
        {
            AvalonComponentService cs = (AvalonComponentService)
                    TurbineServices.getInstance().getService(AvalonComponentService.SERVICE_NAME);

            TestComponent tc = (TestComponent) cs.lookup(TestComponent.ROLE);
            tc.test();
            cs.release(tc);
        }
        catch(Exception e)
        {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.turbine.test.TestComponent

        try
        {
            AvalonComponentService cs = (AvalonComponentService)
                    TurbineServices.getInstance().getService(AvalonComponentService.SERVICE_NAME);

            TestComponent tc = (TestComponent) cs.lookup(TestComponent.ROLE);
            tc.test();
            cs.release(tc);
        }
        catch(Exception e)
        {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.turbine.test.TestComponent

            ServiceManagerService serviceManagerService
                    = ServiceManagerServiceImpl.getInstance();
            assertNotNull(serviceManagerService);

            assertTrue(serviceManagerService.hasService(TestComponent.ROLE));
            TestComponent tc = (TestComponent)
                    serviceManagerService.lookup(TestComponent.ROLE);
            tc.test();
            serviceManagerService.release(tc);
        }
        catch(Exception e)
        {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.turbine.test.TestComponent

        try
        {
            AvalonComponentService cs = (AvalonComponentService)
                    TurbineServices.getInstance().getService(AvalonComponentService.SERVICE_NAME);

            TestComponent tc = (TestComponent) cs.lookup(TestComponent.ROLE);
            tc.test();
            cs.release(tc);
        }
        catch(Exception e)
        {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.turbine.test.TestComponent

        try
        {
            AvalonComponentService cs = (AvalonComponentService)
                    TurbineServices.getInstance().getService(AvalonComponentService.SERVICE_NAME);

            TestComponent tc = (TestComponent) cs.lookup(TestComponent.ROLE);
            tc.test();
            cs.release(tc);
        }
        catch(Exception e)
        {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.turbine.test.TestComponent

     */
    public void testGetAndUseTestComponent()
    {
        try
        {
            TestComponent tc = (TestComponent)TurbineServices.getInstance().getService(TestComponent.ROLE);
            tc.test();
        }
        catch(Exception e)
        {
            e.printStackTrace();
            fail();
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.