@@ -450,203 +450,4 @@ public void test_delete_edge_definition_drop_collections() throws ArangoExceptio
450
450
451
451
}
452
452
453
- @ Test
454
- public void test_create_vertex () throws ArangoException {
455
-
456
- }
457
-
458
- /*
459
- * @Test public void test_drop_Graph() throws ArangoException { String
460
- * graphName = "unitTestGraph";
461
- *
462
- * // create GraphEntity entity1 = driver.createGraph( graphName, new
463
- * ArrayList<EdgeDefinitionEntity>(), new ArrayList<String>(), true );
464
- *
465
- * assertThat(entity1.getCode(), is(201));
466
- * assertThat(entity1.getDocumentRevision(), is(not(0L)));
467
- * assertThat(entity1.getDocumentHandle(), is("_graphs/" + graphName));
468
- *
469
- * }
470
- *
471
- *
472
- *
473
- *
474
- *
475
- * @Test
476
- *
477
- * @Ignore public void test_create_graph_202() throws ArangoException {
478
- *
479
- * // in 1.4.0 manual // 202 is returned if the graph was created successfully
480
- * and waitForSync // was false.
481
- *
482
- * GraphEntity entity = driver.createGraph("g1", "vcol1", "ecol1", false);
483
- * assertThat(entity.getCode(), is(202));
484
- * assertThat(entity.getDocumentRevision(), is(not(0L)));
485
- * assertThat(entity.getDocumentHandle(), is("_graphs/g1"));
486
- * assertThat(entity.getDocumentKey(), is("g1")); //
487
- * assertThat(entity.getVertices(), is("vcol1")); //
488
- * assertThat(entity.getEdges(), is("ecol1"));
489
- *
490
- * }
491
- *
492
- * @Test
493
- *
494
- * @Ignore public void test_create_graph_dup() throws ArangoException {
495
- *
496
- * GraphEntity entity = driver.createGraph("g1", "vcol1", "ecol1", true);
497
- * assertThat(entity.getCode(), is(201));
498
- * assertThat(entity.getDocumentRevision(), is(not(0L)));
499
- * assertThat(entity.getDocumentHandle(), is("_graphs/g1"));
500
- * assertThat(entity.getDocumentKey(), is("g1")); //
501
- * assertThat(entity.getVertices(), is("vcol1")); //
502
- * assertThat(entity.getEdges(), is("ecol1"));
503
- *
504
- * try { driver.createGraph("g1", "vcol1", "ecol1", false); fail(); } catch
505
- * (ArangoException e) { assertThat(e.getCode(), is(400));
506
- * assertThat(e.getErrorNumber(), is(1902)); // graph with the name // already
507
- * exists }
508
- *
509
- * }
510
- *
511
- * // TODO: errorNum: 1902 : "found graph but has different <name>"
512
- *
513
- * @Test
514
- *
515
- * @Ignore public void get_graphs() throws ArangoException {
516
- *
517
- * driver.createGraph("g1", "v1", "e1", null); driver.createGraph("g2", "v2",
518
- * "e2", null); driver.createGraph("g3", "v3", "e3", null);
519
- *
520
- * GraphsEntity graphs = driver.getGraphs(); assertThat(graphs.isError(),
521
- * is(false)); assertThat(graphs.getCode(), is(200));
522
- * assertThat(graphs.getGraphs().size(), is(3));
523
- *
524
- * Collections.sort(graphs.getGraphs(), new Comparator<GraphEntity>() { public
525
- * int compare(GraphEntity o1, GraphEntity o2) { return
526
- * o1.getDocumentKey().compareTo(o2.getDocumentKey()); } });
527
- *
528
- * GraphEntity g = graphs.getGraphs().get(0);
529
- * assertThat(g.getDocumentRevision(), is(not(0L)));
530
- * assertThat(g.getDocumentHandle(), is("_graphs/g1"));
531
- * assertThat(g.getDocumentKey(), is("g1")); // assertThat(g.getVertices(),
532
- * is("v1")); // assertThat(g.getEdges(), is("e1"));
533
- *
534
- * g = graphs.getGraphs().get(1); assertThat(g.getDocumentRevision(),
535
- * is(not(0L))); assertThat(g.getDocumentHandle(), is("_graphs/g2"));
536
- * assertThat(g.getDocumentKey(), is("g2")); // assertThat(g.getVertices(),
537
- * is("v2")); // assertThat(g.getEdges(), is("e2"));
538
- *
539
- * g = graphs.getGraphs().get(2); assertThat(g.getDocumentRevision(),
540
- * is(not(0L))); assertThat(g.getDocumentHandle(), is("_graphs/g3"));
541
- * assertThat(g.getDocumentKey(), is("g3")); // assertThat(g.getVertices(),
542
- * is("v3")); // assertThat(g.getEdges(), is("e3"));
543
- *
544
- * }
545
- *
546
- * @Test
547
- *
548
- * @Ignore public void test_get_graphOLD() throws ArangoException {
549
- *
550
- * driver.createGraph("g1", "v1", "e1", null); GraphEntity g1 =
551
- * driver.getGraph("g1"); assertThat(g1.getDocumentRevision(), is(not(0L)));
552
- * assertThat(g1.getDocumentHandle(), is("_graphs/g1"));
553
- * assertThat(g1.getDocumentKey(), is("g1")); // assertThat(g1.getVertices(),
554
- * is("v1")); // assertThat(g1.getEdges(), is("e1"));
555
- *
556
- * }
557
- *
558
- * @Test public void test_get_graph_404() throws ArangoException {
559
- *
560
- * try { driver.getGraph("g1"); fail(); } catch (ArangoException e) {
561
- * assertThat(e.getCode(), is(404)); assertThat(e.getErrorNumber(), is(1901));
562
- * }
563
- *
564
- * }
565
- *
566
- * @Test public void test_get_graph_none_match_eq() throws ArangoException {
567
- *
568
- * GraphEntity g = driver.createGraph("g1", "v1", "e1", null); GraphEntity g1
569
- * = driver.getGraph("g1", g.getDocumentRevision(), null);
570
- * assertThat(g1.getStatusCode(), is(304)); assertThat(g1.isNotModified(),
571
- * is(true));
572
- *
573
- * }
574
- *
575
- * @Test public void test_get_graph_none_match_ne() throws ArangoException {
576
- *
577
- * GraphEntity g = driver.createGraph("g1", "v1", "e1", null);
578
- *
579
- * GraphEntity g1 = driver.getGraph("g1", g.getDocumentRevision() + 1, null);
580
- * assertThat(g1.isNotModified(), is(false));
581
- * assertThat(g1.getDocumentRevision(), is(not(0L)));
582
- * assertThat(g1.getDocumentHandle(), is("_graphs/g1"));
583
- * assertThat(g1.getDocumentKey(), is("g1")); // assertThat(g1.getVertices(),
584
- * is("v1")); // assertThat(g1.getEdges(), is("e1"));
585
- *
586
- * }
587
- *
588
- * @Test public void test_get_graph_match_eq() throws ArangoException {
589
- *
590
- * GraphEntity g = driver.createGraph("g1", "v1", "e1", null);
591
- *
592
- * GraphEntity g1 = driver.getGraph("g1", null, g.getDocumentRevision());
593
- * assertThat(g1.isNotModified(), is(false));
594
- * assertThat(g1.getDocumentRevision(), is(not(0L)));
595
- * assertThat(g1.getDocumentHandle(), is("_graphs/g1"));
596
- * assertThat(g1.getDocumentKey(), is("g1")); // assertThat(g1.getVertices(),
597
- * is("v1")); // assertThat(g1.getEdges(), is("e1"));
598
- *
599
- * }
600
- *
601
- * @Test public void test_get_graph_match_ne() throws ArangoException {
602
- *
603
- * GraphEntity g = driver.createGraph("g1", "v1", "e1", null);
604
- *
605
- * try { driver.getGraph("g1", null, g.getDocumentRevision() + 1); fail(); }
606
- * catch (ArangoException e) { assertThat(e.getCode(), is(412));
607
- * assertThat(e.getErrorNumber(), is(1901)); // wrong revision }
608
- *
609
- * }
610
- *
611
- * @Test public void test_delete_graph() throws ArangoException {
612
- *
613
- * GraphEntity g1 = driver.createGraph("g1", "v1", "e1", false);
614
- * assertThat(g1.getCode(), is(201));
615
- *
616
- * DeletedEntity del = driver.deleteGraph("g1"); assertThat(del.getCode(),
617
- * is(200)); assertThat(del.getDeleted(), is(true));
618
- *
619
- * }
620
- *
621
- * @Test public void test_delete_graph_404() throws ArangoException {
622
- *
623
- * try { driver.deleteGraph("g1"); fail(); } catch (ArangoException e) {
624
- * assertThat(e.getCode(), is(404)); assertThat(e.getErrorNumber(), is(1901));
625
- * }
626
- *
627
- * }
628
- *
629
- * @Test public void test_delete_graph_ifmatch_ok() throws ArangoException {
630
- *
631
- * GraphEntity g1 = driver.createGraph("g1", "v1", "e1", false);
632
- * assertThat(g1.getCode(), is(201));
633
- *
634
- * DeletedEntity del = driver.deleteGraph("g1", g1.getDocumentRevision());
635
- * assertThat(del.getCode(), is(200)); assertThat(del.getDeleted(), is(true));
636
- *
637
- * }
638
- *
639
- * @Test public void test_delete_graph_ifmatch_ng_412() throws ArangoException
640
- * {
641
- *
642
- * GraphEntity g1 = driver.createGraph("g1", "v1", "e1", false);
643
- * assertThat(g1.getCode(), is(201));
644
- *
645
- * try { driver.deleteGraph("g1", 10L); fail(); } catch (ArangoException e) {
646
- * assertThat(e.getCode(), is(412)); assertThat(e.getErrorNumber(), is(1901));
647
- * // wrong revision assertThat(e.getMessage(), is("[1901]wrong revision")); }
648
- *
649
- * }
650
- */
651
-
652
453
}
0 commit comments