How to use method of org.jmock.test.unit.lib.action.CustomActionTests class

Best Jmock-library code snippet using org.jmock.test.unit.lib.action.CustomActionTests.

Run Jmock-library automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

copy
1/*  Copyright (c) 2000-2004 jMock.org
2 */
3package org.jmock.test.unit.lib.action;
4
5import junit.framework.TestCase;
6
7import org.hamcrest.StringDescription;
8import org.jmock.api.Invocation;
9import org.jmock.lib.action.CustomAction;
10
11
12public class CustomActionTests extends TestCase {
13    static class ConcreteSideEffect extends CustomAction {
14        public ConcreteSideEffect( String description ) {
15            super(description);
16        }
17
18        public Object invoke( Invocation invocation ) throws Throwable {
19            return null;
20        }
21    }
22
23    public void testAppendsGivenDescription() {
24        String description = "DESCRIPTION";
25        CustomAction sideEffect = new ConcreteSideEffect(description);
26        
27        StringDescription buf = new StringDescription();
28        sideEffect.describeTo(buf);
29        assertEquals("should be description", description, buf.toString());
30    }
31}
32
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest

Most used method in CustomActionTests

Trigger code on LambdaTest Cloud Grid

Execute automation tests with on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free
LambdaTestX

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie
Sarah

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)