Skip to content

Commit

Permalink
Add MetafixToDo test for adding with $last in implicit array (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Sep 26, 2024
1 parent 49cfaca commit d20530e
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,42 @@ public void addWithPrependInImplicitArray() {
);
}

@Test
@MetafixToDo("See https://github.com/metafacture/metafacture-fix/issues/369")
public void addWithLastInImplicitArray() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"add_field('my.name.$last','patrick')",
"add_field('my.name.$last','nicolas')"
),
i -> {
i.startRecord("1");
i.endRecord();

i.startRecord("2");
i.startEntity("my");
i.literal("name", "max");
i.endEntity();
i.endRecord();

i.startRecord("3");
i.endRecord();
},
o -> {
o.get().startRecord("1");
o.get().endRecord();

o.get().startRecord("2");
o.get().startEntity("my");
o.get().literal("name", "nicolas");
o.get().endEntity();
o.get().endRecord();

o.get().startRecord("3");
o.get().endRecord();
}
);
}

@Test
public void addWithAppendInArray() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
Expand Down

0 comments on commit d20530e

Please sign in to comment.