Package com.vaadin.server

Examples of com.vaadin.server.ClientMethodInvocation


            throws Exception {
        JsonArray originalArray = Json.createArray();
        originalArray.set(0, "callbackParameter1");
        originalArray.set(1, "callBackParameter2");
        originalArray.set(2, "12345");
        ClientMethodInvocation original = new ClientMethodInvocation(null,
                "interfaceName", JAVASCRIPT_CALLBACK_METHOD, new Object[] {
                        "callBackMethodName", originalArray });

        ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
        JsonArray copyArray = (JsonArray) copy.getParameters()[1];
        assertEquals(JsonUtil.stringify(originalArray), JsonUtil.stringify(copyArray));
    }
View Full Code Here


    public void testClientMethodSerialization_WithBasicParams_NoChanges()
            throws Exception {
        String stringParam = "a string 123";
        Integer integerParam = 1234567890;
        ClientMethodInvocation original = new ClientMethodInvocation(null,
                "interfaceName", BASIC_PARAMS_CALL_METHOD, new Serializable[] {
                        stringParam, integerParam });
        ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
        String copyString = (String) copy.getParameters()[0];
        Integer copyInteger = (Integer) copy.getParameters()[1];
        assertEquals(copyString, stringParam);
        assertEquals(copyInteger, integerParam);
    }
View Full Code Here

        assertEquals(copyString, stringParam);
        assertEquals(copyInteger, integerParam);
    }

    public void testClientMethodSerialization_NoParams_NoExceptions() {
        ClientMethodInvocation original = new ClientMethodInvocation(null,
                "interfaceName", NO_PARAMS_CALL_METHOD, null);
        ClientMethodInvocation copy = (ClientMethodInvocation) serializeAndDeserialize(original);
    }
View Full Code Here

TOP

Related Classes of com.vaadin.server.ClientMethodInvocation

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.