Package com.mysema.query.sql

Examples of com.mysema.query.sql.SQLListeners


    @Test
    public void NotifyQuery()
    {
        SQLListener listener = createMock(SQLListener.class);
        SQLListeners listeners = new SQLListeners();
        listeners.add(listener);

        QueryMetadata md = new DefaultQueryMetadata();
        listener.notifyQuery(md);
        replay(listener);

        listeners.notifyQuery(md);
        verify(listener);
    }
View Full Code Here


    @Test
    public void NotifyQuery_Parent()
    {
        SQLListener listener = createMock(SQLListener.class);
        SQLListeners listeners = new SQLListeners(listener);

        QueryMetadata md = new DefaultQueryMetadata();
        listener.notifyQuery(md);
        replay(listener);

        listeners.notifyQuery(md);
        verify(listener);
    }
View Full Code Here

        listener2.start(sqlListenerContext);
        replay(listener2);


        SQLListeners listeners = new SQLListeners(listenerParent);
        listeners.add(listener1);
        listeners.add(listener2);

        listeners.start(sqlListenerContext);
        verify(listenerParent);
        verify(listener1);
        verify(listener2);
    }
View Full Code Here

        SQLListenerContext sqlListenerContext = new SQLListenerContextImpl(new DefaultQueryMetadata());
        SQLDetailedListener listenerParent = new AssertingDetailedListener("keyParent", "valueParent");
        SQLDetailedListener listener1 = new AssertingDetailedListener("key1", "value1");
        SQLDetailedListener listener2 = new AssertingDetailedListener("key1", "value1");

        SQLListeners listeners = new SQLListeners(listenerParent);
        listeners.add(listener1);
        listeners.add(listener2);

        listeners.start(sqlListenerContext);
        listeners.preRender(sqlListenerContext);
        listeners.rendered(sqlListenerContext);
        listeners.prePrepare(sqlListenerContext);
        listeners.prepared(sqlListenerContext);
        listeners.preExecute(sqlListenerContext);
        listeners.preExecute(sqlListenerContext);
    }
View Full Code Here

TOP

Related Classes of com.mysema.query.sql.SQLListeners

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.