Skip to content

Commit 1ad8131

Browse files
committed
Adjust documentation and tests #333
1 parent 18b6044 commit 1ad8131

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ Parameters:
706706

707707
Options:
708708

709-
- `default`: Default value to use for unknown values. (Default: Old value)
709+
- `"default"`: Default value to use for unknown values. The `"default"`-key needs to be in quotation marks since it is a reserved word in Java. (Default: Old value)
710710
- `delete`: Whether to delete unknown values. (Default: `false`)
711711
- `print_unknown`: Whether to print unknown values. (Default: `false`)
712712

metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public void shouldLookupInSeparateInternalMap() {
457457
public void shouldUseDefaultOptionFromLookupOption() {
458458
assertMap(
459459
"put_map('testMap', Aloha: Alohaeha, 'Moin': 'Moin zäme')",
460-
LOOKUP + " 'testMap', default: 'Tach')"
460+
LOOKUP + " 'testMap', 'default': 'Tach')"
461461
);
462462
}
463463

@@ -642,7 +642,7 @@ public void shouldUseDefaultValueIfNotFound() {
642642
public void shouldUseDefaultOptionValueIfNotFound() {
643643
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
644644
"put_map('testMap', Aloha: Alohaeha, 'Moin': 'Moin zäme')",
645-
"lookup('title.*', 'testMap', default: 'Tach')"
645+
"lookup('title.*', 'testMap', 'default': 'Tach')"
646646
),
647647
i -> {
648648
i.startRecord("1");
@@ -665,7 +665,7 @@ public void shouldUseDefaultOptionValueIfNotFound() {
665665
public void shouldPreferDefaultOptionValueOverDefaultMapValue() {
666666
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
667667
"put_map('testMap', Aloha: Alohaeha, 'Moin': 'Moin zäme', __default: Tach)",
668-
"lookup('title.*', 'testMap', default: 'Hi')"
668+
"lookup('title.*', 'testMap', 'default': 'Hi')"
669669
),
670670
i -> {
671671
i.startRecord("1");

0 commit comments

Comments
 (0)