Package org.fusesource.restygwt.client.basic

Examples of org.fusesource.restygwt.client.basic.ExampleService


    }

    public void testMockedDispatcher() {

        /** Mock/Stub mocked example service: */
        ExampleService exampleService = new ExampleService() {
            @Override
            public void getExampleDto(MethodCallback<ExampleDto> callback) {
                ExampleDto exampleDto = new ExampleDto();
                exampleDto.name = "name";
               callback.onSuccess(null, exampleDto);
            }
            @Override
            public Request getExampleDtoCancelable(MethodCallback<ExampleDto> callback) {
                ExampleDto exampleDto = new ExampleDto();
                exampleDto.name = "name";
                callback.onSuccess(null, exampleDto);
                return null;
            }
        };

        /** test*/
        exampleService.getExampleDto(new MethodCallback<ExampleDto>() {
            @Override
            public void onSuccess(Method method, ExampleDto response) {
                assertEquals(response.name, "name");

            }
View Full Code Here

TOP

Related Classes of org.fusesource.restygwt.client.basic.ExampleService

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.