Oops can't use reflection in shared tests.

This commit is contained in:
Michael Bayne
2017-09-20 09:51:53 -07:00
parent 172f35fb64
commit 8cddc839e3
@@ -432,20 +432,13 @@ public abstract class SharedTests extends GWTTestCase
} }
@Test public void testNestedIndex () { @Test public void testNestedIndex () {
class Foo {
public String name;
public Integer quantity;
public Foo(String name, Integer quantity) {
this.name = name;
this.quantity = quantity;
}
}
String tmpl = String tmpl =
"{{#fooList}}\n" + "{{#fooList}}\n" +
"{{#quantity}}|q{{-index}}={{quantity}}{{/quantity}}|{{name}}\n" + "{{#quantity}}|q{{-index}}={{quantity}}{{/quantity}}|{{name}}\n" +
"{{/fooList}}"; "{{/fooList}}";
test("|q1=1|a\n|b\n", tmpl, test("|q1=1|a\n|b\n", tmpl,
context("fooList", Arrays.asList(new Foo("a", 1), new Foo("b", null)))); context("fooList", Arrays.asList(context("name", "a", "quantity", 1),
context("name", "b"))));
} }
@Test public void testLineReporting () { @Test public void testLineReporting () {