Package org.apache.cxf.javascript.JavascriptTestUtilities

Examples of org.apache.cxf.javascript.JavascriptTestUtilities.Notifier


       
        Scriptable jsBean1 = testBean1ToJS(testUtilities, context, b1);
        Scriptable jsBeanArray = context.newArray(testUtilities.getRhinoScope(), jsBeans);
       
        LOG.info("About to call beanFunctionTest " + getAddress());
        Notifier notifier =
            testUtilities.rhinoCallConvert("beanFunctionTest", Notifier.class,
                                           testUtilities.javaToJS(getAddress()),
                                           jsBean1,
                                           jsBeanArray);
        boolean notified = notifier.waitForJavascript(1000 * 10);
        assertTrue(notified);
        Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
        assertNull(errorStatus);
        String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
        assertNull(errorText);
View Full Code Here


        b1.beanTwoNotRequiredItem = new TestBean2("bean2");
       
        Scriptable jsBean1 = testBean1ToJS(testUtilities, context, b1);
       
        LOG.info("About to call compliant" + getAddress());
        Notifier notifier =
            testUtilities.rhinoCallConvert("compliantTest", Notifier.class,
                                           testUtilities.javaToJS(getAddress()),
                                           jsBean1);
        boolean notified = notifier.waitForJavascript(1000 * 10);
        assertTrue(notified);
        Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
        assertNull(errorStatus);
        String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
        assertNull(errorText);
View Full Code Here

        return null;
    }
   
    private Void actionMethodCaller(Context context) {
        LOG.info("About to call actionMethod" + getAddress());
        Notifier notifier =
            testUtilities.rhinoCallConvert("actionMethodTest", Notifier.class,
                                           testUtilities.javaToJS(getAddress()),
                                           "wrong");
        boolean notified = notifier.waitForJavascript(1000 * 10);
        assertTrue(notified);
        Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
        assertNull(errorStatus);
        String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
        assertNull(errorText);
View Full Code Here

        return null;
    }
   
    private Void compliantNoArgsCaller(Context context) {
        LOG.info("About to call compliantNoArgs " + getAddress());
        Notifier notifier =
            testUtilities.rhinoCallConvert("compliantNoArgsTest", Notifier.class,
                                           testUtilities.javaToJS(getAddress()));

        boolean notified = notifier.waitForJavascript(1000 * 10);
        assertTrue(notified);
        Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
        assertNull(errorStatus);
        String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
        assertNull(errorText);
View Full Code Here

        implementor = (MtoMImpl)rawImplementor;
        implementor.reset();
    }
   
    private Void acceptMtoMString(Context context) throws IOException {
        Notifier notifier =
            testUtilities.rhinoCallConvert("testMtoMString", Notifier.class,
                                           testUtilities.javaToJS(getAddress()));
        boolean notified = notifier.waitForJavascript(1000 * 10);
        assertTrue(notified);
        Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
        assertNull(errorStatus);
        String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
        assertNull(errorText);
View Full Code Here

        assertEquals("<html>\u0027</html>", stuff);
        return null;
    }

    private Void sendMtoMString(Context context) throws IOException {
        Notifier notifier =
            testUtilities.rhinoCallConvert("testMtoMReply", Notifier.class,
                                           testUtilities.javaToJS(getAddress()));
        boolean notified = notifier.waitForJavascript(1000 * 10);
        assertTrue(notified);
        Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
        String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
        assertNull(errorStatus);
        assertNull(errorText);
View Full Code Here

       
        Scriptable jsBean1 = testBean1ToJS(testUtilities, context, b1);
        Scriptable jsBeanArray = context.newArray(testUtilities.getRhinoScope(), jsBeans);
       
        LOG.info("About to call test4 " + getAddress());
        Notifier notifier =
            testUtilities.rhinoCallConvert("test4", Notifier.class,
                                           testUtilities.javaToJS(getAddress()),
                                           testUtilities.javaToJS(Boolean.valueOf(useWrapper)),
                                           jsBean1,
                                           jsBeanArray);
        boolean notified = notifier.waitForJavascript(1000 * 10);
        assertTrue(notified);
        Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
        assertNull(errorStatus);
        String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
        assertNull(errorText);
View Full Code Here

    public void callFunctionWithHeader() {
        testUtilities.runInsideContext(Void.class, new JSRunnable<Void>() {

            public Void run(Context context) {
                LOG.info("About to call testDummyHeader " + getAddress());
                Notifier notifier =
                    testUtilities.rhinoCallConvert("testDummyHeader", Notifier.class,
                                                   testUtilities.javaToJS(getAddress()),
                                                   testUtilities.javaToJS("narcissus"),
                                                   null);
                boolean notified = notifier.waitForJavascript(1000 * 10);
                assertTrue(notified);
                Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
                assertNull(errorStatus);
                String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
                assertNull(errorText);
View Full Code Here

    @Test
    public void callIntReturnMethod() {
        testUtilities.runInsideContext(Void.class, new JSRunnable<Void>() {
            public Void run(Context context) {
                LOG.info("About to call test3/IntFunction" + getAddress());
                Notifier notifier =
                    testUtilities.rhinoCallConvert("test3", Notifier.class,
                                                   testUtilities.javaToJS(getAddress()),
                                                   testUtilities.javaToJS(Double.valueOf(17.0)),
                                                   testUtilities.javaToJS(Float.valueOf((float)111.0)),
                                                   testUtilities.javaToJS(Integer.valueOf(142)),
                                                   testUtilities.javaToJS(Long.valueOf(1240000)),
                                                   null);
                boolean notified = notifier.waitForJavascript(1000 * 10);
                assertTrue(notified);
                Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
                assertNull(errorStatus);
                String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
                assertNull(errorText);
View Full Code Here

    @Test
    public void callMethodWithoutWrappers() {
        testUtilities.runInsideContext(Void.class, new JSRunnable<Void>() {
            public Void run(Context context) {
                LOG.info("About to call test2 " + getAddress());
                Notifier notifier =
                    testUtilities.rhinoCallConvert("test2", Notifier.class,
                                                   testUtilities.javaToJS(getAddress()),
                                                   testUtilities.javaToJS(Double.valueOf(17.0)),
                                                   testUtilities.javaToJS(Float.valueOf((float)111.0)),
                                                   testUtilities.javaToJS(Integer.valueOf(142)),
                                                   testUtilities.javaToJS(Long.valueOf(1240000)),
                                                   "This is the cereal shot from gnus");
                boolean notified = notifier.waitForJavascript(1000 * 10);
                assertTrue(notified);
                Integer errorStatus = testUtilities.rhinoEvaluateConvert("globalErrorStatus", Integer.class);
                assertNull(errorStatus);
                String errorText = testUtilities.rhinoEvaluateConvert("globalErrorStatusText", String.class);
                assertNull(errorText);
View Full Code Here

TOP

Related Classes of org.apache.cxf.javascript.JavascriptTestUtilities.Notifier

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.