Package ognl

Examples of ognl.TypeConverter.convertValue()


        // Training

        // Since we have no idea what OGNL will stuff into that Map parameter,
        // we just ignore it.
        tc.convertValue(null, f, m, "value", d, String.class);
        tcc.setMatcher(new NullMeansIgnoreMatcher());

        tcc.setReturnValue("FROM-TYPE-CONVERTER");

        replayControls();
View Full Code Here


        // Training

        // Since we have no idea what OGNL will stuff into that Map parameter,
        // we just ignore it.
        tc.convertValue(null, f, m, "value", d, String.class);
        tcc.setMatcher(new NullMeansIgnoreMatcher());

        tcc.setReturnValue("FROM-TYPE-CONVERTER");

        replayControls();
View Full Code Here

        // Training

        // Since we have no idea what OGNL will stuff into that Map parameter,
        // we just ignore it.
        expect(tc.convertValue(isA(Map.class), eq(f), eq(m), eq("value"), eq(d), eq(String.class)))
        .andReturn("FROM-TYPE-CONVERTER");

        replay();

        ee.write(f, "value", d);
View Full Code Here

  public void shouldNotInstantiateIfLastTerm() throws OgnlException, NoSuchMethodException {
    final TypeConverter typeConverter = mock(TypeConverter.class);
    final House house = new House();
    final Mouse tom = new Mouse();
    Method method = House.class.getDeclaredMethod("setMouse", Mouse.class);
    when(typeConverter.convertValue(context, house, method,  "mouse", "22", Mouse.class)).thenReturn(tom);

    Ognl.setTypeConverter(context, typeConverter);
    Ognl.setValue("mouse", context, house, "22");
    assertThat(house.getMouse(), is(equalTo(tom)));
  }
View Full Code Here

        // Training

        // Since we have no idea what OGNL will stuff into that Map parameter,
        // we just ignore it.
        tc.convertValue(null, f, m, "value", d, String.class);
        tcc.setMatcher(new NullMeansIgnoreMatcher());

        tcc.setReturnValue("FROM-TYPE-CONVERTER");

        replayControls();
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.