Package org.apache.cayenne.event

Examples of org.apache.cayenne.event.MockEventManager


                Arrays.asList(o1)));

        ClientChannel channel = new ClientChannel(
                connection,
                false,
                new MockEventManager(),
                false);

        CayenneContext context = new CayenneContext(channel);
        ObjEntity entity = new ObjEntity("test_entity");
        entity.setClassName(MockPersistentObject.class.getName());
View Full Code Here


                Arrays.asList(o2)));

        ClientChannel channel = new ClientChannel(
                connection,
                false,
                new MockEventManager(),
                false);

        context.setChannel(channel);
        QueryResponse response = channel.onQuery(context, new SelectQuery("test_entity"));
        assertNotNull(response);
View Full Code Here

        MockClientConnection connection = new MockClientConnection(new GenericResponse(
                Arrays.asList(o2)));

        ClientChannel channel = new ClientChannel(connection,
                false,
                new MockEventManager(),
                false);

        context.setChannel(channel);
        QueryResponse response = channel.onQuery(context, new SelectQuery("test_entity"));
        assertNotNull(response);
View Full Code Here

        // default constructor must fail
        try {
            new ClientChannel(connection,
                    false,
                    new MockEventManager(),
                    false);
            fail("Channel didn't throw on broken EventBridge");
        }
        catch (CayenneRuntimeException e) {
            // expected
View Full Code Here

        MockClientConnection connection = new MockClientConnection(new GenericResponse(
                Arrays.asList(inflated)));
        ClientChannel channel = new ClientChannel(
                connection,
                false,
                new MockEventManager(),
                false);

        // check that a HOLLOW object is infalted on "beforePropertyRead"
        ClientMtTable1 hollow = new ClientMtTable1();
        hollow.setPersistenceState(PersistenceState.HOLLOW);
View Full Code Here

        MockClientConnection connection = new MockClientConnection(new GenericResponse(
                Arrays.asList(inflated)));
        ClientChannel channel = new ClientChannel(
                connection,
                false,
                new MockEventManager(),
                false);

        CayenneContext context = new CayenneContext(channel);
        context.setEntityResolver(serverContext
                .getEntityResolver()
View Full Code Here

        TEST_DEFAULTS.put(DataRowStore.SNAPSHOT_CACHE_SIZE_PROPERTY, new Integer(10));
        TEST_DEFAULTS.put(DataRowStore.REMOTE_NOTIFICATION_PROPERTY, Boolean.FALSE);
    }

    public MockDataRowStore() {
        super("mock DataRowStore", TEST_DEFAULTS, new MockEventManager());
    }
View Full Code Here

                    Resource configurationResource) throws ConfigurationException {
                return new ConfigurationTree<DataChannelDescriptor>(testDescriptor, null);
            }
        };

        final EventManager eventManager = new MockEventManager();

        Module testModule = new Module() {

            public void configure(Binder binder) {
                final AdhocObjectFactory objectFactory = new DefaultAdhocObjectFactory();
View Full Code Here

public class DataContextFactoryTest extends TestCase {

    public void testCreateDataContextWithDedicatedCache() throws Exception {

        final EventManager eventManager = new MockEventManager();
        final DataDomain domain = new DataDomain("d1");

        domain.setSharedCacheEnabled(false);

        Module testModule = new Module() {
View Full Code Here

                c3.getObjectStore().getDataRowCache(),
                domain.getSharedSnapshotCache());
    }

    public void testCreateDataContextValidation() throws Exception {
        final EventManager eventManager = new MockEventManager();
        final DataDomain domain = new DataDomain("d1");

        domain.setValidatingObjectsOnCommit(true);

        Module testModule = new Module() {
View Full Code Here

TOP

Related Classes of org.apache.cayenne.event.MockEventManager

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.