Package org.auraframework.service

Examples of org.auraframework.service.ServerService.writeDefinitions()


        Set<DefDescriptor<?>> dependencies = context.getDefRegistry().getDependencies(uid);

        // prime def cache
        StringWriter output = new StringWriter();
        ss.writeDefinitions(dependencies, output);
        String text = output.toString();
        final String dupeCheck = "$A.clientService.initDefs(";
        if (text.indexOf(dupeCheck) != text.lastIndexOf(dupeCheck)) {
            fail("found duplicated code in: " + text);
        }
View Full Code Here


            fail("found duplicated code in: " + text);
        }

        // now check that defs not re-written with unempty cache
        output = new StringWriter();
        ss.writeDefinitions(dependencies, output);
        text = output.toString();
        if (text.indexOf(dupeCheck) != text.lastIndexOf(dupeCheck)) {
            fail("found duplicated code in: " + text);
        }
    }
View Full Code Here

        context.addLoaded(appDesc, uid);

        Set<DefDescriptor<?>> dependencies = context.getDefRegistry().getDependencies(uid);

        StringWriter output = new StringWriter();
        ss.writeDefinitions(dependencies, output);

        String sourceNoWhitespace = output.toString().replaceAll("\\s", "");

        String[] preloads = new String[]{
                "\"descriptor\":\"markup://aura:placeholder\"",
View Full Code Here

        context.addLoaded(appDesc, uid);
        Set<DefDescriptor<?>> dependencies = context.getDefRegistry().getDependencies(uid);

        ServerService ss = Aura.getServerService();
        StringWriter output = new StringWriter();
        ss.writeDefinitions(dependencies, output);

        String js = output.toString();
        assertFalse("There are syntax errors preventing compression of application javascript",
            js.contains("There are errors preventing this file from being minimized!"));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.