Package de.odysseus.el.util

Examples of de.odysseus.el.util.SimpleResolver


  public void testCoerceToType() {
    assertEquals("1", factory.coerceToType(1l, String.class));
  }

  public void testCreateTreeValueExpression() {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals(1l, factory.createValueExpression(context, "${1}", Object.class).getValue(context));
  }
View Full Code Here


    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals(1l, factory.createValueExpression(context, "${1}", Object.class).getValue(context));
  }

  public void testCreateObjectValueExpression() {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals("1", factory.createValueExpression("1", Object.class).getValue(context));
  }
View Full Code Here

    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals("1", factory.createValueExpression("1", Object.class).getValue(context));
  }

  public void testCreateMethodExpression() throws NoSuchMethodException {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    context.getELResolver().setValue(context, null, "foo", this);
    assertEquals(bar(), factory.createMethodExpression(context, "${foo.bar}", null, new Class[0]).invoke(context, null));
  }
View Full Code Here

  SimpleContext context;
  TreeStore store = new TreeStore(new Builder(), null);
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver(new BeanELResolver()));
    context.getELResolver().setValue(context, null, "base", this);

    // variables var_long_1, var_long_2
    context.setVariable("var_long_1", new TreeValueExpression(store, null, null, "${1}", long.class));
    context.setVariable("var_long_2", new TreeValueExpression(store, null, null, "${1}", long.class));
View Full Code Here

  SimpleContext context;
  TreeStore store = new TreeStore(new Builder(), null);
 
  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver(new BeanELResolver()));
    context.getELResolver().setValue(context, null, "base", this);
  }
View Full Code Here

        return new DefaultELContext(elResolver);
    }

    public ELResolver createELResolver()
    {
        return new SimpleResolver(true);
    }
View Full Code Here

        return new TestELContext(elResolver);
    }

    public ELResolver createELResolver()
    {
        return new SimpleResolver(true /*readonly*/);
    }
View Full Code Here

    chain.add(new ResourceBundleELResolver());

    chain.add(new BeanELResolver());

    return new SimpleResolver(chain);
  }
View Full Code Here

  public void testCoerceToType() {
    assertEquals("1", factory.coerceToType(1l, String.class));
  }

  public void testCreateTreeValueExpression() {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals(1l, factory.createValueExpression(context, "${1}", Object.class).getValue(context));
  }
View Full Code Here

    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals(1l, factory.createValueExpression(context, "${1}", Object.class).getValue(context));
  }

  public void testCreateObjectValueExpression() {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals("1", factory.createValueExpression("1", Object.class).getValue(context));
  }
View Full Code Here

TOP

Related Classes of de.odysseus.el.util.SimpleResolver

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.