Skip to content

Commit 3d8e751

Browse files
committed
Update tests.
1 parent e0fdbc7 commit 3d8e751

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

httprpc-client/src/test/java/org/httprpc/io/TemplateEncoderTest.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,19 +337,22 @@ public void testInvertedSection4() throws IOException {
337337
}
338338

339339
@Test
340-
public void testParentContext() throws IOException {
341-
TemplateEncoder encoder = new TemplateEncoder(getClass().getResource("parent.txt"));
340+
public void testInheritance() throws IOException {
341+
TemplateEncoder encoder = new TemplateEncoder(getClass().getResource("inheritance.txt"));
342342

343343
Map<String, ?> dictionary = mapOf(
344-
entry("a", "A"),
344+
entry("a", "$"),
345345
entry("b", mapOf(
346346
entry("c", "C")
347347
)),
348-
entry("list", listOf(1, 2, 3)),
349-
entry("map", mapOf(
350-
entry("x", "one"),
351-
entry("y", "two"),
352-
entry("z", "three")
348+
entry("d", mapOf(
349+
entry("a", "A"),
350+
entry("list", listOf(1, 2, 3)),
351+
entry("map", mapOf(
352+
entry("x", "one"),
353+
entry("y", "two"),
354+
entry("z", "three")
355+
))
353356
))
354357
);
355358

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{?d}}{{#list[,]}}{{a}}{{b/c}}{{.}}{{/list}} {{#map[,]}}{{a}}{{b/c}}{{.}}{{/map}}{{/d}}

httprpc-client/src/test/resources/org/httprpc/io/parent.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)