Package greed.model

Examples of greed.model.ParamValue


    }

    @Test
    public void testRenderHtmlStringQuote() {
        HashMap<String, Object> model = new HashMap<String, Object>();
        model.put("stringParam", new ParamValue(
                    new Param("stringParam", Type.STRING_TYPE, 0),
                    "\"quoted\"")
                );

        String result = engine.render("${stringParam;html}", model);
        System.out.println(result);
        assertThat(result, equalTo("&quot;quoted&quot;"));

        model.put("gridParam", new ParamValue(
                    new Param("gridParam", Type.STRING_ARRAY_TYPE, 1),
                    new String[] {"\"\"", ".."}
                    )
                );
        String gridResult = engine.render("${gridParam;html(grid)}", model);
View Full Code Here


        String[] valueList0 = new String[]{"919, 111, 234", "234, 567, 555"};
        String[] valueList1 = new String[]{"\"a\", \"b\", \"c\"", "\"d\""};
        String[] valueList2 = new String[]{"\"abcd\", \"efg\"", "\"123\", \"456\""};
        Testcase case0 = new Testcase(0, new ParamValue[]{
                new ParamValue(param1, "15"),
                new ParamValue(param2, valueList0),
                new ParamValue(param3, valueList1)
        }, new ParamValue(new Param("return", retType, 0), valueList2));

        Problem problem = new Problem("Test", 250, "TestClass", 2000, 256, method, new Testcase[]{case0}, null);

        Map<String, Object> model = new HashMap<String, Object>();
        model.put("Problem", problem);
View Full Code Here

TOP

Related Classes of greed.model.ParamValue

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.