Skip to content

Commit 7426589

Browse files
committed
test: update api to graph database
Signed-off-by: Otavio Santana <[email protected]>
1 parent 82cc7aa commit 7426589

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/mapping/DefaultEdgeTraversalTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void shouldReturnOutEWithSupplier() {
9494
void shouldReturnErrorOutEWhenIsNull() {
9595
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().outE((String) null)
9696
.stream()
97-
.collect(toList()));
97+
.toList());
9898
}
9999

100100
@Test
@@ -122,7 +122,7 @@ void shouldReturnInEWitSupplier() {
122122
void shouldReturnErrorWhenInEIsNull() {
123123
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().inE((String) null)
124124
.stream()
125-
.collect(toList()));
125+
.toList());
126126

127127
}
128128

@@ -148,7 +148,7 @@ void shouldReturnBothEWithSupplier() {
148148
void shouldReturnErrorWhenBothEIsNull() {
149149
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().bothE((String) null)
150150
.stream()
151-
.collect(toList()));
151+
.toList());
152152
}
153153

154154

@@ -533,7 +533,7 @@ void shouldDedup() {
533533
.inE("knows")
534534
.dedup()
535535
.result()
536-
.collect(Collectors.toList());
536+
.toList();
537537

538538
assertEquals(6, edges.size());
539539
}

jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/mapping/DefaultVertexTraversalTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void shouldReturnErrorWhenHasPredicateIsNull() {
161161
P<Integer> gt = null;
162162
graphTemplate.traversalVertex().has("age", gt)
163163
.result()
164-
.collect(toList());
164+
.toList();
165165
});
166166
}
167167

@@ -170,7 +170,7 @@ void shouldReturnErrorWhenHasKeyIsNull() {
170170
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().has((String) null,
171171
P.gt(26))
172172
.result()
173-
.collect(toList()));
173+
.toList());
174174
}
175175

176176
@Test
@@ -192,7 +192,7 @@ void shouldHaveLabel2() {
192192
@Test
193193
void shouldReturnErrorWhenHasLabelHasNull() {
194194
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().hasLabel((String) null)
195-
.<Book>result().collect(toList()));
195+
.<Book>result().toList());
196196
}
197197

198198
@Test
@@ -204,7 +204,7 @@ void shouldIn() {
204204

205205
@Test
206206
void shouldReturnErrorWhenInIsNull() {
207-
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().out((String) null).<Book>result().collect(toList()));
207+
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().out((String) null).<Book>result().toList());
208208
}
209209

210210
@Test
@@ -216,7 +216,7 @@ void shouldOut() {
216216

217217
@Test
218218
void shouldReturnErrorWhenOutIsNull() {
219-
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().in((String) null).<Person>result().collect(toList()));
219+
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().in((String) null).<Person>result().toList());
220220
}
221221

222222
@Test
@@ -229,7 +229,7 @@ void shouldBoth() {
229229
@Test
230230
void shouldReturnErrorWhenBothIsNull() {
231231
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().both((String) null)
232-
.<Person>result().collect(toList()));
232+
.<Person>result().toList());
233233
}
234234

235235
@Test
@@ -241,7 +241,7 @@ void shouldNot() {
241241
@Test
242242
void shouldReturnErrorWhenHasNotIsNull() {
243243
assertThrows(NullPointerException.class, () -> graphTemplate.traversalVertex().hasNot((String) null)
244-
.result().collect(toList()));
244+
.result().toList());
245245
}
246246

247247
@Test
@@ -510,7 +510,7 @@ void shouldDedup() {
510510
people = graphTemplate.traversalVertex()
511511
.hasLabel(Person.class)
512512
.in("knows").dedup().<Person>result()
513-
.collect(Collectors.toList());
513+
.toList();
514514

515515
assertEquals(3, people.size());
516516
}

0 commit comments

Comments
 (0)