We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22950f6 commit 75f259bCopy full SHA for 75f259b
src/test/java/org/seedstack/coffig/evaluator/MacroEvaluatorTest.java
@@ -91,6 +91,9 @@ public void setUp() throws Exception {
91
),
92
new MapNode(
93
new NamedNode("message", "${'1:2:3'}")
94
+ ),
95
+ new MapNode(
96
+ new NamedNode("message", "${unknown:other:'fallback'}")
97
)
98
))
99
);
@@ -144,6 +147,11 @@ public void testNestedRef() throws Exception {
144
147
assertThat(evaluate("refOfRef")).isEqualTo("null");
145
148
}
146
149
150
+ @Test
151
+ public void testMultipleDefaults() throws Exception {
152
+ assertThat(evaluate("test[14].message")).isEqualTo("fallback");
153
+ }
154
+
155
private String evaluate(String path) {
156
return macroEvaluator.evaluate(config, config.get(path).get()).value();
157
0 commit comments