@@ -71,7 +71,6 @@ public void setup() throws ArangoException {
7171 driver .createCollection (COLLECTION_NAME );
7272 } catch (ArangoException e ) {
7373 }
74- driver .truncateCollection (COLLECTION_NAME );
7574
7675 // add some test data
7776 for (int i = 0 ; i < 100 ; i ++) {
@@ -105,52 +104,6 @@ public void test_simple_all() throws ArangoException {
105104 assertThat (count , is (100 ));
106105 }
107106
108- @ SuppressWarnings ("deprecation" )
109- @ Test
110- public void test_simple_all_deprecated () throws ArangoException {
111-
112- CursorResultSet <TestComplexEntity01 > rs = driver .executeSimpleAllWithResultSet (COLLECTION_NAME , 0 , 0 ,
113- TestComplexEntity01 .class );
114- int count = 0 ;
115- while (rs .hasNext ()) {
116- TestComplexEntity01 entity = rs .next ();
117- count ++;
118-
119- assertThat (entity , is (notNullValue ()));
120- }
121- rs .close ();
122-
123- assertThat (count , is (100 ));
124- }
125-
126- @ SuppressWarnings ("deprecation" )
127- @ Test
128- public void test_simple_all_with_doc_deprecated () throws ArangoException {
129-
130- CursorResultSet <DocumentEntity <TestComplexEntity01 >> rs = driver
131- .executeSimpleAllWithDocumentResultSet (COLLECTION_NAME , 0 , 0 , TestComplexEntity01 .class );
132- int count = 0 ;
133- int ageCount = 0 ;
134- while (rs .hasNext ()) {
135- DocumentEntity <TestComplexEntity01 > doc = rs .next ();
136- count ++;
137-
138- assertThat (doc , is (notNullValue ()));
139- assertThat (doc .getDocumentHandle (), startsWith (COLLECTION_NAME ));
140- assertThat (doc .getDocumentKey (), is (notNullValue ()));
141- assertThat (doc .getDocumentRevision (), is (not (0L )));
142-
143- if (doc .getEntity ().getAge () != 0 ) {
144- ageCount ++;
145- }
146- }
147- rs .close ();
148-
149- assertThat (count , is (100 ));
150- assertThat (ageCount , is (99 ));
151-
152- }
153-
154107 @ Test
155108 public void test_example_by () throws ArangoException {
156109
@@ -168,48 +121,6 @@ public void test_example_by() throws ArangoException {
168121 assertThat (count , is (10 ));
169122 }
170123
171- @ SuppressWarnings ("deprecation" )
172- @ Test
173- public void test_example_by_deprecated () throws ArangoException {
174-
175- CursorResultSet <TestComplexEntity01 > rs = driver .executeSimpleByExampleWithResusltSet (COLLECTION_NAME ,
176- new MapBuilder ().put ("user" , "user_6" ).get (), 0 , 0 , TestComplexEntity01 .class );
177- int count = 0 ;
178- while (rs .hasNext ()) {
179- TestComplexEntity01 entity = rs .next ();
180- count ++;
181-
182- assertThat (entity .getUser (), is ("user_6" ));
183- }
184- rs .close ();
185-
186- assertThat (count , is (10 ));
187-
188- }
189-
190- @ SuppressWarnings ("deprecation" )
191- @ Test
192- public void test_example_by_with_doc_deprecated () throws ArangoException {
193-
194- CursorResultSet <DocumentEntity <TestComplexEntity01 >> rs = driver .executeSimpleByExampleWithDocumentResusltSet (
195- COLLECTION_NAME , new MapBuilder ().put ("user" , "user_6" ).get (), 0 , 0 , TestComplexEntity01 .class );
196- int count = 0 ;
197- while (rs .hasNext ()) {
198- DocumentEntity <TestComplexEntity01 > doc = rs .next ();
199- count ++;
200-
201- assertThat (doc .getDocumentHandle (), startsWith (COLLECTION_NAME ));
202- assertThat (doc .getDocumentKey (), is (notNullValue ()));
203- assertThat (doc .getDocumentRevision (), is (not (0L )));
204-
205- assertThat (doc .getEntity ().getUser (), is ("user_6" ));
206- }
207- rs .close ();
208-
209- assertThat (count , is (10 ));
210-
211- }
212-
213124 @ Test
214125 public void test_first_example () throws ArangoException {
215126
@@ -263,22 +174,6 @@ public void test_range_no_skiplist() throws ArangoException {
263174
264175 }
265176
266- @ SuppressWarnings ("deprecation" )
267- @ Test
268- public void test_range_no_skiplist_deprecated () throws ArangoException {
269-
270- // no suitable index known
271- try {
272- driver .executeSimpleRangeWithResultSet (COLLECTION_NAME , "age" , 5 , 30 , null , 0 , 0 ,
273- TestComplexEntity01 .class );
274- fail ("request should fail" );
275- } catch (ArangoException e ) {
276- assertThat (e .getErrorNumber (), is (1209 ));
277- assertThat (e .getCode (), is (404 ));
278- }
279-
280- }
281-
282177 @ Test
283178 public void test_range () throws ArangoException {
284179
@@ -317,90 +212,6 @@ public void test_range() throws ArangoException {
317212
318213 }
319214
320- @ SuppressWarnings ("deprecation" )
321- @ Test
322- public void test_range_deprecated () throws ArangoException {
323-
324- // create skip-list
325- driver .createIndex (COLLECTION_NAME , IndexType .SKIPLIST , false , "age" );
326-
327- {
328- CursorResultSet <TestComplexEntity01 > rs = driver .executeSimpleRangeWithResultSet (COLLECTION_NAME , "age" , 5 ,
329- 30 , null , 0 , 0 , TestComplexEntity01 .class );
330-
331- int count = 0 ;
332- while (rs .hasNext ()) {
333- TestComplexEntity01 entity = rs .next ();
334- count ++;
335- assertThat (entity , is (notNullValue ()));
336- }
337- rs .close ();
338- assertThat (count , is (25 ));
339- }
340-
341- {
342- CursorResultSet <TestComplexEntity01 > rs = driver .executeSimpleRangeWithResultSet (COLLECTION_NAME , "age" , 5 ,
343- 30 , true , 0 , 0 , TestComplexEntity01 .class );
344-
345- int count = 0 ;
346- while (rs .hasNext ()) {
347- TestComplexEntity01 entity = rs .next ();
348- count ++;
349- assertThat (entity , is (notNullValue ()));
350- }
351- rs .close ();
352- assertThat (count , is (26 ));
353- }
354-
355- }
356-
357- @ SuppressWarnings ("deprecation" )
358- @ Test
359- public void test_range_with_doc_deprecated () throws ArangoException {
360-
361- // create skip-list
362- driver .createIndex (COLLECTION_NAME , IndexType .SKIPLIST , false , "age" );
363-
364- {
365- CursorResultSet <DocumentEntity <TestComplexEntity01 >> rs = driver .executeSimpleRangeWithDocumentResultSet (
366- COLLECTION_NAME , "age" , 5 , 30 , null , 0 , 0 , TestComplexEntity01 .class );
367-
368- int count = 0 ;
369- while (rs .hasNext ()) {
370- DocumentEntity <TestComplexEntity01 > doc = rs .next ();
371- count ++;
372- assertThat (doc , is (notNullValue ()));
373- assertThat (doc .getDocumentHandle (), startsWith (COLLECTION_NAME ));
374- assertThat (doc .getDocumentKey (), is (notNullValue ()));
375- assertThat (doc .getDocumentRevision (), is (not (0L )));
376- assertThat (doc .getEntity (), is (notNullValue ()));
377- assertThat (doc .getEntity ().getAge (), is (not (0 )));
378- }
379- rs .close ();
380- assertThat (count , is (25 ));
381- }
382-
383- {
384- CursorResultSet <DocumentEntity <TestComplexEntity01 >> rs = driver .executeSimpleRangeWithDocumentResultSet (
385- COLLECTION_NAME , "age" , 5 , 30 , true , 0 , 0 , TestComplexEntity01 .class );
386-
387- int count = 0 ;
388- while (rs .hasNext ()) {
389- DocumentEntity <TestComplexEntity01 > doc = rs .next ();
390- count ++;
391- assertThat (doc , is (notNullValue ()));
392- assertThat (doc .getDocumentHandle (), startsWith (COLLECTION_NAME ));
393- assertThat (doc .getDocumentKey (), is (notNullValue ()));
394- assertThat (doc .getDocumentRevision (), is (not (0L )));
395- assertThat (doc .getEntity (), is (notNullValue ()));
396- assertThat (doc .getEntity ().getAge (), is (not (0 )));
397- }
398- rs .close ();
399- assertThat (count , is (26 ));
400- }
401-
402- }
403-
404215 @ Test
405216 public void test_remove_by_example () throws ArangoException {
406217
0 commit comments