54
54
import com .arangodb .entity .BaseDocument ;
55
55
import com .arangodb .entity .BaseEdgeDocument ;
56
56
import com .arangodb .entity .CollectionEntity ;
57
+ import com .arangodb .entity .CollectionPropertiesEntity ;
57
58
import com .arangodb .entity .CollectionType ;
58
59
import com .arangodb .entity .DatabaseEntity ;
59
60
import com .arangodb .entity .GraphEntity ;
@@ -161,8 +162,9 @@ public void createCollectionWithNumberOfShardsAndShardKey() {
161
162
new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" ));
162
163
assertThat (result , is (notNullValue ()));
163
164
assertThat (result .getId (), is (notNullValue ()));
164
- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getNumberOfShards (), is (2 ));
165
- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getShardKeys ().size (), is (1 ));
165
+ final CollectionPropertiesEntity properties = db .collection (COLLECTION_NAME ).getProperties ();
166
+ assertThat (properties .getNumberOfShards (), is (2 ));
167
+ assertThat (properties .getShardKeys ().size (), is (1 ));
166
168
} finally {
167
169
db .collection (COLLECTION_NAME ).drop ();
168
170
}
@@ -178,8 +180,9 @@ public void createCollectionWithNumberOfShardsAndShardKeys() {
178
180
new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" , "b" ));
179
181
assertThat (result , is (notNullValue ()));
180
182
assertThat (result .getId (), is (notNullValue ()));
181
- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getNumberOfShards (), is (2 ));
182
- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getShardKeys ().size (), is (2 ));
183
+ final CollectionPropertiesEntity properties = db .collection (COLLECTION_NAME ).getProperties ();
184
+ assertThat (properties .getNumberOfShards (), is (2 ));
185
+ assertThat (properties .getShardKeys ().size (), is (2 ));
183
186
} finally {
184
187
db .collection (COLLECTION_NAME ).drop ();
185
188
}
0 commit comments