Package webit.script.io.impl

Examples of webit.script.io.impl.DiscardOut


   
    @Test
    public void test() throws ResourceNotFoundException {
        Template template = EngineManager.getTemplate("/debug.wit");
       
        template.merge(new DiscardOut());
       
        labelCache.clear();
        pointCount = 0;
        template.debug(KeyValuesUtil.EMPTY_KEY_VALUES, new DiscardOut(), new BreakPointListener() {

            public void onBreak(String label, Context context, Statement statement, Object result) {
                labelCache.add(label);
                pointCount ++;
            }
View Full Code Here


                        bytesBuffer.reset();
                    }
                    out.reset();
                } else {
                    mergeTemplate(templatePath, new DiscardOut());
                }
            }
        } catch (ParseException e) {
            e.printStackTrace();
            throw e;
View Full Code Here

public class TrimBlankLineTest {

    @Test
    public void test() throws ResourceNotFoundException {
        Engine engine = EngineManager.getEngine();
        DiscardOut out = new DiscardOut();

        engine.setTrimCodeBlockBlankLine(true);
        Template template = engine.getTemplate("/trimBlankLine.wit");

        Map<String, Object> param = new HashMap<String, Object>(4);
View Full Code Here

public class RouteLoaderTest {

    @Test
    public void test() throws ResourceNotFoundException {

        DiscardOut out = new DiscardOut();

        EngineManager.getTemplate("lib:/lib.wit").merge(out);
        EngineManager.getTemplate("lib:sub:/lib-sub.wit").merge(out);
    }
View Full Code Here

        try {
            engine.setShareRootData(true);

            Template template = engine.getTemplate("/shareData.wit");
            template.reload();
            template.merge(KeyValuesUtil.wrap(new String[]{"v1", "v2"}, new Object[]{"V1", "V2"}), new DiscardOut());
        } finally {
            engine.setShareRootData(false);
        }
    }
View Full Code Here

    @Test
    public void test() throws ResourceNotFoundException {

        Template template = EngineManager.getTemplate("contextTest.wit");

        Context context = template.merge(new DiscardOut());

        Map map = new HashMap();

        assertEquals("a", context.get("a"));
View Full Code Here

public class FunctionExportTest {

    @Test
    public void test() throws ResourceNotFoundException {

        Context context = EngineManager.getTemplate("/functionExportTest.wit").merge(new DiscardOut());

        //plus
        Function plus = context.exportFunction("plus");

        assertNotNull(plus);
View Full Code Here

        Engine engine = EngineManager.getEngine();
        try {
            engine.setLooseVar(true);
           
            Template template = engine.getTemplate("/looseVar.wit");
            template.merge(new DiscardOut());
        } finally {
            engine.setLooseVar(false);
        }
    }
View Full Code Here

public class HelloTest {

    @Test
    public void test() throws ResourceNotFoundException {
        Template template = EngineManager.getTemplate("/helloTest.wit");
        template.merge(new DiscardOut());
    }
View Full Code Here

        this.globalManager.commit();
    }

    private void executeInitTemplates() throws ResourceNotFoundException {
        if (this.inits != null) {
            final Out out = new DiscardOut();
            final GlobalManager myGlobalManager = this.globalManager;
            final Bag globalBag = myGlobalManager.getGlobalBag();
            final Bag constBag = myGlobalManager.getGlobalBag();
            final KeyValues params = KeyValuesUtil.wrap(
                    new String[]{"GLOBAL", "CONST"},
View Full Code Here

TOP

Related Classes of webit.script.io.impl.DiscardOut

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.