struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukasz.len...@googlemail.com>
Subject Re: New release
Date Wed, 17 Mar 2010 09:15:00 GMT
2010/3/16 Dale Newfield <dale@newfield.org>:
> 151 and 157 appear to have fixes in the issues...any chance we can
> incorporate them, too?

I don't know how to test them, without real test cases I will not
implement those changes!

I made used below test case for 151 and it went smoothly with and
without changes:

    public void testNestedASTOrExpressions() throws Exception {
        // given
        String expression = "'t1' + ('t2' || 't3')";
        OgnlContext context = new OgnlContext();

        // when
        Node value = Ognl.compileExpression(context, null, expression);

        // then
        assertEquals("t1t2", value.getValue(context, null));
    }

For 157 I tried below test case after implementing the change but it
throws java.lang.IllegalArgumentException: argument type mismatch

    public void testMethodWithoutVarargsParameters() throws Exception {
        // given
        String expression = "clear()";
        OgnlContext context = new OgnlContext();
        StringChild root = new StringChild();

        // when
        Node value = Ognl.compileExpression(context, root, expression);

        // then
        assertEquals("t1t2", value.getValue(context, root));
    }


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message