Package com.firefly.template.support

Examples of com.firefly.template.support.ObjectNavigator.find()


    model.put("b", map2);
    model.put("arr", arr);
    model.put("list", list);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(o.find(model, "a").toString(), is("fffff"));
    Assert.assertThat(o.find(model, "b['ccc']").toString(), is("ddd"));
    Assert.assertThat(o.find(model, "b['eee']").toString(), is("fff"));
    Assert.assertThat(o.find(model, "b[\"ccc\"]").toString(), is("ddd"));
    Assert.assertThat((Integer)o.find(model, "arr[2]"), is(333));
    Assert.assertThat(o.find(model, "list[2]").toString(), is("list333"));
View Full Code Here


    model.put("arr", arr);
    model.put("list", list);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(o.find(model, "a").toString(), is("fffff"));
    Assert.assertThat(o.find(model, "b['ccc']").toString(), is("ddd"));
    Assert.assertThat(o.find(model, "b['eee']").toString(), is("fff"));
    Assert.assertThat(o.find(model, "b[\"ccc\"]").toString(), is("ddd"));
    Assert.assertThat((Integer)o.find(model, "arr[2]"), is(333));
    Assert.assertThat(o.find(model, "list[2]").toString(), is("list333"));
  }
View Full Code Here

    model.put("list", list);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(o.find(model, "a").toString(), is("fffff"));
    Assert.assertThat(o.find(model, "b['ccc']").toString(), is("ddd"));
    Assert.assertThat(o.find(model, "b['eee']").toString(), is("fff"));
    Assert.assertThat(o.find(model, "b[\"ccc\"]").toString(), is("ddd"));
    Assert.assertThat((Integer)o.find(model, "arr[2]"), is(333));
    Assert.assertThat(o.find(model, "list[2]").toString(), is("list333"));
  }
 
View Full Code Here

   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(o.find(model, "a").toString(), is("fffff"));
    Assert.assertThat(o.find(model, "b['ccc']").toString(), is("ddd"));
    Assert.assertThat(o.find(model, "b['eee']").toString(), is("fff"));
    Assert.assertThat(o.find(model, "b[\"ccc\"]").toString(), is("ddd"));
    Assert.assertThat((Integer)o.find(model, "arr[2]"), is(333));
    Assert.assertThat(o.find(model, "list[2]").toString(), is("list333"));
  }
 
  @Test
View Full Code Here

    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(o.find(model, "a").toString(), is("fffff"));
    Assert.assertThat(o.find(model, "b['ccc']").toString(), is("ddd"));
    Assert.assertThat(o.find(model, "b['eee']").toString(), is("fff"));
    Assert.assertThat(o.find(model, "b[\"ccc\"]").toString(), is("ddd"));
    Assert.assertThat((Integer)o.find(model, "arr[2]"), is(333));
    Assert.assertThat(o.find(model, "list[2]").toString(), is("list333"));
  }
 
  @Test
  public void testObject() {
View Full Code Here

    Assert.assertThat(o.find(model, "a").toString(), is("fffff"));
    Assert.assertThat(o.find(model, "b['ccc']").toString(), is("ddd"));
    Assert.assertThat(o.find(model, "b['eee']").toString(), is("fff"));
    Assert.assertThat(o.find(model, "b[\"ccc\"]").toString(), is("ddd"));
    Assert.assertThat((Integer)o.find(model, "arr[2]"), is(333));
    Assert.assertThat(o.find(model, "list[2]").toString(), is("list333"));
  }
 
  @Test
  public void testObject() {
    Foo foo = new Foo();
View Full Code Here

   
    Model model = new ModelMock();
    model.put("foo", foo);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.info")), is("bar1"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
    Assert.assertThat(o.find(model, "foo.map['bar5']"), nullValue());
View Full Code Here

    Model model = new ModelMock();
    model.put("foo", foo);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.info")), is("bar1"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
    Assert.assertThat(o.find(model, "foo.map['bar5']"), nullValue());
    Assert.assertThat(o.find(model, "ok"), nullValue());
View Full Code Here

    model.put("foo", foo);
   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.info")), is("bar1"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
    Assert.assertThat(o.find(model, "foo.map['bar5']"), nullValue());
    Assert.assertThat(o.find(model, "ok"), nullValue());
  }
View Full Code Here

   
    ObjectNavigator o = ObjectNavigator.getInstance();
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.info")), is("bar1"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.serialNumber")), is("33"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.bar.price")), is("3.3"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.numbers[2]")), is("5"));
    Assert.assertThat(String.valueOf(o.find(model, "foo.map['bar2'].price")), is("2.3"));
    Assert.assertThat(o.find(model, "foo.map['bar5']"), nullValue());
    Assert.assertThat(o.find(model, "ok"), nullValue());
  }
 
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.