Skip to content

Commit 117d81c

Browse files
committed
test(Compare and Comply): Update tests
1 parent 0bd8fcc commit 117d81c

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

compare-comply/src/test/java/com/ibm/watson/compare_comply/v1/CompareComplyTest.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,11 @@ public void testClassifyElements() throws FileNotFoundException, InterruptedExce
636636
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getBegin());
637637
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getEnd());
638638
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getText());
639-
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getCellId());
640-
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getBegin());
641-
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getEnd());
642-
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getText());
639+
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getCellId());
640+
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation()
641+
.getBegin());
642+
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation().getEnd());
643+
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getText());
643644
assertEquals(TEXT, response.getTables().get(0).getTitle().getText());
644645
assertEquals(BEGIN, response.getTables().get(0).getTitle().getLocation().getBegin());
645646
assertEquals(END, response.getTables().get(0).getTitle().getLocation().getEnd());
@@ -795,10 +796,11 @@ public void testExtractTables() throws FileNotFoundException, InterruptedExcepti
795796
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getBegin());
796797
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getEnd());
797798
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getText());
798-
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getCellId());
799-
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getBegin());
800-
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getEnd());
801-
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getText());
799+
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getCellId());
800+
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation()
801+
.getBegin());
802+
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation().getEnd());
803+
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getText());
802804
}
803805

804806
@Test

compare-comply/src/test/resources/compare_comply/classify-return.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,16 @@
166166
},
167167
"text": "text"
168168
},
169-
"value": {
170-
"cell_id": "cell_id",
171-
"location": {
172-
"begin": 0,
173-
"end": 1
174-
},
175-
"text": "text"
176-
}
169+
"value": [
170+
{
171+
"cell_id": "cell_id",
172+
"location": {
173+
"begin": 0,
174+
"end": 1
175+
},
176+
"text": "text"
177+
}
178+
]
177179
}
178180
],
179181
"title": {

compare-comply/src/test/resources/compare_comply/table-return.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,16 @@
127127
},
128128
"text": "text"
129129
},
130-
"value": {
131-
"cell_id": "cell_id",
132-
"location": {
133-
"begin": 0,
134-
"end": 1
135-
},
136-
"text": "text"
137-
}
130+
"value": [
131+
{
132+
"cell_id": "cell_id",
133+
"location": {
134+
"begin": 0,
135+
"end": 1
136+
},
137+
"text": "text"
138+
}
139+
]
138140
}
139141
]
140142
}

0 commit comments

Comments
 (0)