Package org.mule.tools.rhinodo.impl.console

Examples of org.mule.tools.rhinodo.impl.console.WrappingConsoleProvider


    @Test
    public void testGetConsoleAsScriptable() throws Exception {

        final Global globalScope = new Global();

        final WrappingConsoleProvider wrappingConsoleFactory =
                new WrappingConsoleProvider(new SystemOutConsole());

        ContextFactory contextFactory = new ContextFactory();
        contextFactory.call(new ContextAction() {
            @Override
            public Object run(Context cx) {
                cx.initStandardObjects(globalScope);
                Scriptable consoleAsScriptable = wrappingConsoleFactory.getConsoleAsScriptable(globalScope);

                Function log = ScriptableObject.getTypedProperty(consoleAsScriptable, "log", Function.class);
                Function apply = ScriptableObject.getTypedProperty(log, "apply", Function.class);

                assertFalse(Scriptable.NOT_FOUND.equals(apply));
View Full Code Here


    @Test
    public void testGetConsoleAsScriptable() throws Exception {

        final Global globalScope = new Global();

        final WrappingConsoleProvider wrappingConsoleFactory =
                new WrappingConsoleProvider(new SystemOutConsole());

        ContextFactory contextFactory = new ContextFactory();
        contextFactory.call(new ContextAction() {
            @Override
            public Object run(Context cx) {
                cx.initStandardObjects(globalScope);
                Scriptable consoleAsScriptable = wrappingConsoleFactory.getConsoleAsScriptable(globalScope);

                Function log = ScriptableObject.getTypedProperty(consoleAsScriptable, "log", Function.class);
                Function apply = ScriptableObject.getTypedProperty(log, "apply", Function.class);

                assertFalse(Scriptable.NOT_FOUND.equals(apply));
View Full Code Here

TOP

Related Classes of org.mule.tools.rhinodo.impl.console.WrappingConsoleProvider

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.