Package com.agical.rmock.core

Examples of com.agical.rmock.core.Action


    }
   
    public void testInvalidateSessionReleasesUnderlyingSessionAndRemoveSessionFromManager() throws Exception {
        final org.apache.geronimo.clustering.Session underlyingSession =recordCreateUnderlyingSession();
        underlyingSession.release();
        modify().perform(new Action() {
            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                sessionListener.notifySessionDestruction(underlyingSession);
                return null;
            }
        });
View Full Code Here


                manager.add(primaryKey, instance);
                return instance;
            }
        });
        session.getState(WadiCache.SESSION_KEY_ENTRY);
        modify().multiplicity(expect.from(0)).perform(new Action() {
            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                return newBeanEntryTask.get();
            }
        });
        return newBeanEntryTask;
View Full Code Here

                manager.add(primaryKey, instance);
                return instance;
            }
        });
        session.getState(WadiCache.SESSION_KEY_ENTRY);
        modify().multiplicity(expect.from(0)).perform(new Action() {
            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                return newBeanEntryTask.get();
            }
        });
        return newBeanEntryTask;
View Full Code Here

                manager.add(primaryKey, instance);
                return instance;
            }
        });
        session.getState(WadiCache.SESSION_KEY_ENTRY);
        modify().multiplicity(expect.from(0)).perform(new Action() {
            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                return newBeanEntryTask.get();
            }
        });
        return newBeanEntryTask;
View Full Code Here

        }
    }
   
    public void testClusterListenerRegistrationCallback() throws Exception {
        wadiCluster.addClusterListener(null);
        modify().args(is.ANYTHING).perform(new Action() {

            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                org.codehaus.wadi.group.ClusterListener wadiListener = (org.codehaus.wadi.group.ClusterListener) arg0[0];
                wadiListener.onListenerRegistration(wadiCluster, Collections.singleton(peer1));
                return null;
View Full Code Here

        cluster.addClusterListener(listener);
    }
   
    public void testClusterListenerMembershipChangeCallback() throws Exception {
        wadiCluster.addClusterListener(null);
        modify().args(is.ANYTHING).perform(new Action() {

            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                org.codehaus.wadi.group.ClusterListener wadiListener = (org.codehaus.wadi.group.ClusterListener) arg0[0];
                wadiListener.onMembershipChanged(wadiCluster, Collections.singleton(peer1), Collections.singleton(peer2));
                return null;
View Full Code Here

    public void testInvalidateSessionReleasesUnderlyingSessionAndRemoveSessionFromManager() throws Exception {
        final org.apache.geronimo.clustering.Session underlyingSession =recordCreateUnderlyingSession();
        context.getLoader();
        modify().returnValue(null);
        underlyingSession.release();
        modify().perform(new Action() {
            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                sessionListener.notifySessionDestruction(underlyingSession);
                return null;
            }
        });
View Full Code Here

    public void testInvalidateSessionReleasesUnderlyingSessionAndRemoveSessionFromManager() throws Exception {
        final org.apache.geronimo.clustering.Session underlyingSession =recordCreateUnderlyingSession();
        context.getLoader();
        modify().returnValue(null);
        underlyingSession.release();
        modify().perform(new Action() {
            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                sessionListener.notifySessionDestruction(underlyingSession);
                return null;
            }
        });
View Full Code Here

    }
   
    public void testInvalidateSessionReleasesUnderlyingSessionAndRemoveSessionFromManager() throws Exception {
        final org.apache.geronimo.clustering.Session underlyingSession =recordCreateUnderlyingSession();
        underlyingSession.release();
        modify().perform(new Action() {
            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                sessionListener.notifySessionDestruction(underlyingSession);
                return null;
            }
        });
View Full Code Here

        }
    }
   
    public void testClusterListenerRegistrationCallback() throws Exception {
        wadiCluster.addClusterListener(null);
        modify().args(is.ANYTHING).perform(new Action() {

            public Object invocation(Object[] arg0, MethodHandle arg1) throws Throwable {
                org.codehaus.wadi.group.ClusterListener wadiListener = (org.codehaus.wadi.group.ClusterListener) arg0[0];
                wadiListener.onListenerRegistration(wadiCluster, Collections.singleton(peer1));;
                return null;
View Full Code Here

TOP

Related Classes of com.agical.rmock.core.Action

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.