Package de.odysseus.el.tree

Examples of de.odysseus.el.tree.Bindings


    assertTrue(parseNode("${foo}").isLeftValue());
  }

  public void testGetType() {
    Tree tree = null;
    Bindings bindings = null;

    tree = parse("${var_long_1}");
    bindings = tree.bind(null, context.getVariableMapper());
    assertEquals(null, getNode(tree).getType(bindings, context));
View Full Code Here


    assertEquals(null, getNode(tree).getType(bindings, context));
  }

  public void testIsReadOnly() {
    Tree tree = null;
    Bindings bindings = null;
   
    tree = parse("${var_long_1}");
    bindings = tree.bind(null, context.getVariableMapper());
    assertTrue(getNode(tree).isReadOnly(bindings, context));
View Full Code Here

    assertTrue(getNode(tree).isReadOnly(bindings, context));
  }

  public void testSetValue() {
    Tree tree = null;
    Bindings bindings = null;

    tree = parse("${bad}");
    bindings = tree.bind(null, context.getVariableMapper());
    getNode(tree).setValue(bindings, context, "good");
    assertEquals("good", getNode(tree).getValue(bindings, context, null));
View Full Code Here

    try { getNode(tree).setValue(bindings, context, "bar"); fail(); } catch (ELException e) {}
  }

  public void testGetValue() {
    Tree tree = null;
    Bindings bindings = null;

    tree = parse("${bad}");
    bindings = tree.bind(null, context.getVariableMapper());
    try { getNode(tree).getValue(bindings, context, null); fail(); } catch (ELException e) {}
   
View Full Code Here

    assertEquals("1", getNode(tree).getValue(bindings, context, String.class));
  }
 
  public void testGetValueReference() {
    Tree tree = null;
    Bindings bindings = null;

    tree = parse("${var_long_1}");
    bindings = tree.bind(null, context.getVariableMapper());
    assertNull(getNode(tree).getValueReference(bindings, context));
View Full Code Here

    assertNotNull(getNode(tree).getValueReference(bindings, context));
  }

  public void testInvoke() {
    Tree tree = null;
    Bindings bindings = null;

    tree = parse("${bad}");
    bindings = tree.bind(null, context.getVariableMapper());
    try { getNode(tree).invoke(bindings, context, long.class, new Class[0], null); fail(); } catch (ELException e) {}
   
View Full Code Here

  }

  public void testGetMethodInfo() {
    Tree tree = null;
    Bindings bindings = null;
    MethodInfo info = null;

    tree = parse("${bad}");
    bindings = tree.bind(null, context.getVariableMapper());
    try { getNode(tree).getMethodInfo(bindings, context, long.class, new Class[0]); fail(); } catch (ELException e) {}
View Full Code Here

  }

  public void testAppendStructure() {
    StringBuilder s = null;

    Bindings bindings = new Bindings(null, null);
   
    s = new StringBuilder();
    parseNode("${f()}").appendStructure(s, bindings);
    parseNode("${f(x)}").appendStructure(s, bindings);
    parseNode("${f(x,y)}").appendStructure(s, bindings);
View Full Code Here

  @Override
  protected void setUp() throws Exception {
    context = new SimpleContext(new SimpleResolver(new BeanELResolver()));
    context.getELResolver().setValue(context, null, "base", this);
   
    bindings = new Bindings(null, new ValueExpression[1]);
  }
View Full Code Here

    assertEquals(3l, parseNode("${base.bar(3)}").eval(bindings, context));
  }

  public void testAppendStructure() {
    StringBuilder s = new StringBuilder();
    parseNode("${foo.bar(1)}").appendStructure(s, new Bindings(null, null, null));
    assertEquals("foo.bar(1)", s.toString());
  }
View Full Code Here

TOP

Related Classes of de.odysseus.el.tree.Bindings

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.