Skip to content

Commit 406d436

Browse files
author
Mark
committed
ignore field order in test
1 parent c614ae6 commit 406d436

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test/java/com/arangodb/ArangoDriverIndexTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.arangodb;
1818

19+
import static org.hamcrest.CoreMatchers.hasItems;
1920
import static org.hamcrest.CoreMatchers.is;
2021
import static org.hamcrest.CoreMatchers.not;
2122
import static org.hamcrest.CoreMatchers.notNullValue;
@@ -389,8 +390,7 @@ public void test_getIndexes() throws ArangoException {
389390
assertThat(indexes.getIndexes().get(0).getFields().get(0), is("_key"));
390391
assertThat(indexes.getIndexes().get(1).getType(), is(IndexType.HASH));
391392
assertThat(indexes.getIndexes().get(1).getFields().size(), is(2));
392-
assertThat(indexes.getIndexes().get(1).getFields().get(1), is("name"));
393-
assertThat(indexes.getIndexes().get(1).getFields().get(0), is("age"));
393+
assertThat(indexes.getIndexes().get(1).getFields(), hasItems("name", "age"));
394394

395395
final String id1 = indexes.getIndexes().get(0).getId();
396396
final String id2 = indexes.getIndexes().get(1).getId();
@@ -401,8 +401,7 @@ public void test_getIndexes() throws ArangoException {
401401
assertThat(indexes.getIdentifiers().get(id1).getFields().get(0), is("_key"));
402402
assertThat(indexes.getIdentifiers().get(id2).getType(), is(IndexType.HASH));
403403
assertThat(indexes.getIdentifiers().get(id2).getFields().size(), is(2));
404-
assertThat(indexes.getIdentifiers().get(id2).getFields().get(1), is("name"));
405-
assertThat(indexes.getIdentifiers().get(id2).getFields().get(0), is("age"));
404+
assertThat(indexes.getIdentifiers().get(id2).getFields(), hasItems("name", "age"));
406405

407406
}
408407

0 commit comments

Comments
 (0)