Package com.firefly.template

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


   
    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"));
  }
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"));
  }
 
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"));
  }
 
  public static void main(String[] args) {
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"));
  }
 
  public static void main(String[] args) {
    Foo foo = new Foo();
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"));
  }
 
  public static void main(String[] args) {
    Foo foo = new Foo();
    Bar bar = new Bar();
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.