Skip to content

Commit 53c2e6b

Browse files
committed
Add testing if result is uniq (#686)
We need to set setRepeatedFieldsToEntities to "false", else the paths would never be duplicated by automatically getting an increasing index.
1 parent a675424 commit 53c2e6b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

metafix/src/main/java/org/metafacture/metafix/FindFixPaths.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public FindFixPaths(final String objectPattern) {
5959
this.objectPattern = objectPattern;
6060
try {
6161
this.fix = new Metafix("nothing()");
62-
this.fix.setRepeatedFieldsToEntities(true);
62+
this.fix.setRepeatedFieldsToEntities(false);
6363
}
6464
catch (final IOException e) {
6565
throw new MetafactureException(e);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public FindFixPathsTest() {
4747
public void testShouldFindPaths() {
4848
verify(
4949
"a\t|\tAn ETL test",
50-
"c.2\t|\tETL what?");
50+
"c\t|\tETL what?");
5151
}
5252

5353
private void processRecord() {
@@ -59,6 +59,7 @@ private void processRecord() {
5959
finder.literal("b", "Dog");
6060
finder.literal("c", "");
6161
finder.literal("c", "ETL what?");
62+
finder.literal("a", "An ETL test");
6263
finder.endRecord();
6364
finder.closeStream();
6465
}

0 commit comments

Comments
 (0)