Examples of JUnit4Mockery


Examples of org.jmock.integration.junit4.JUnit4Mockery

    }

    @Test
    public void testRun() {
        final boolean pause = true;
        final Mockery mockCtx = new JUnit4Mockery();
        final Worker worker = mockCtx.mock(Worker.class);
        mockCtx.checking(new Expectations(){{
            oneOf(worker).togglePause(pause);
        }});
        final PauseCommand pauseCmd = new PauseCommand(pause);
        pauseCmd.setWorker(worker);
        pauseCmd.run();
        mockCtx.assertIsSatisfied();
    }
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.