Examples of MockComponent


Examples of org.apache.camel.component.mock.MockComponent

    public static class MyModule extends CamelModuleWithMatchingRoutes {
        @Provides
        @JndiBind("foo")
        MockComponent foo() {
            return new MockComponent();
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

    public static class MyModule extends CamelModuleWithMatchingRoutes {
        @Provides
        @JndiBind("foo")
        MockComponent foo() {
            return new MockComponent();
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

    public static class MyModule extends CamelModuleWithMatchingRoutes {
        @Provides
        @JndiBind("foo")
        MockComponent foo() {
            return new MockComponent();
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

    public static class MyModule extends CamelModuleWithMatchingRoutes {
        @Provides
        @JndiBind("foo")
        MockComponent foo() {
            return new MockComponent();
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

    protected Configuration _configuration;

    @Before
    public void startUp() {
        _camelContext = new SwitchYardCamelContextImpl(false);
        _camelContext.addComponent("switchyard", new MockComponent());
        _configuration = mock(Configuration.class);
    }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

    public static class MyModule extends CamelModuleWithMatchingRoutes {
        @Provides
        @JndiBind("foo")
        MockComponent foo() {
            return new MockComponent();
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

/**
*/
public class NamedEndpointBean {
    @Produces @Named("myNamedEndpoint")
    public Endpoint createEndpoint() {
        return new MockEndpoint("mock:nameInjected", new MockComponent());
    }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

    public static class MyModule extends CamelModuleWithMatchingRoutes {
        @Provides
        @JndiBind("foo")
        MockComponent foo() {
            return new MockComponent();
        }
View Full Code Here

Examples of org.apache.camel.component.mock.MockComponent

    public static class MyModule extends CamelModuleWithMatchingRoutes {
        @Provides
        @JndiBind("foo")
        MockComponent foo() {
            return new MockComponent();
        }
View Full Code Here

Examples of org.apache.jetspeed.components.MockComponent

      
   
   
    public void testInterceptors() throws Exception
    {
        MockComponent mc = (MockComponent) ctx.getBean("mockComponent");
        InvocationCountingCache cache = (InvocationCountingCache) ctx.getBean("systemCache");
        assertNotNull(mc);
        assertNotNull(cache);
       
        assertNotNull(mc.getValue("2"));
        assertEquals(1, cache.containsCount);
        assertEquals(0, cache.getCount);
        assertEquals(0, cache.successGetCount);
        assertEquals(1, cache.putCount);
        assertEquals(0, cache.removeCount);
       
        assertNotNull(mc.getValue("2"));
        assertEquals(2, cache.containsCount);
        assertEquals(1, cache.getCount);
        assertEquals(1, cache.successGetCount);
        assertEquals(1, cache.putCount);
        assertEquals(0, cache.removeCount);
       
        mc.setValue("2", "some other value");
        assertEquals(2, cache.containsCount);
        assertEquals(1, cache.getCount);
        assertEquals(1, cache.successGetCount);
        assertEquals(1, cache.putCount);
        assertEquals(1, cache.removeCount);
       
        assertEquals("some other value", mc.getValue("2"));
        assertEquals(3, cache.containsCount);
        assertEquals(1, cache.getCount);
        assertEquals(1, cache.successGetCount);
        assertEquals(2, cache.putCount);
        assertEquals(1, cache.removeCount);
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.