Examples of ObjectContextFactory


Examples of org.apache.cayenne.configuration.ObjectContextFactory

            public void configure(Binder binder) {

                binder.bind(DataChannel.class).to(MockDataChannel.class);
                binder.bind(ObjectContextFactory.class).toInstance(
                        new ObjectContextFactory() {

                            public ObjectContext createContext(DataChannel parent) {
                                return new MockObjectContext();
                            }
View Full Code Here

Examples of org.apache.cayenne.configuration.ObjectContextFactory

            }
        };

        Injector injector = DIBootstrap.createInjector(module);

        ObjectContextFactory factory = injector.getInstance(ObjectContextFactory.class);
        assertNotNull(factory);
        assertSame("ObjectContextFactory must be a singleton", factory, injector
                .getInstance(ObjectContextFactory.class));
    }
View Full Code Here

Examples of org.apache.cayenne.configuration.ObjectContextFactory

        assertSame(channel, runtime.getChannel());
    }

    public void testGetObjectContext_CustomModule() {
        final ObjectContext context = new DataContext();
        final ObjectContextFactory factory = new ObjectContextFactory() {

            public ObjectContext createContext(DataChannel parent) {
                return context;
            }
View Full Code Here

Examples of org.apache.cayenne.configuration.ObjectContextFactory

        Map<String, String> map = new HashMap<String, String>();
        map.put(
                Constants.SERVER_ROP_EVENT_BRIDGE_FACTORY_PROPERTY,
                MockEventBridgeFactory.class.getName());

        ObjectContextFactory factory = new ObjectContextFactory() {

            public ObjectContext createContext(DataChannel parent) {
                return null;
            }
View Full Code Here

Examples of org.apache.cayenne.configuration.ObjectContextFactory

    }

    public void testProcessMessageExceptionSerializability() throws Throwable {

        Map<String, String> map = new HashMap<String, String>();
        ObjectContextFactory factory = new ObjectContextFactory() {

            public ObjectContext createContext(DataChannel parent) {
                return null;
            }
View Full Code Here

Examples of org.apache.cayenne.configuration.ObjectContextFactory

        Map<String, String> map = new HashMap<String, String>();
        map.put(
                Constants.SERVER_ROP_EVENT_BRIDGE_FACTORY_PROPERTY,
                MockEventBridgeFactory.class.getName());

        ObjectContextFactory factory = new ObjectContextFactory() {

            public ObjectContext createContext(DataChannel parent) {
                return null;
            }
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.