@@ -398,10 +398,11 @@ public void queryForEnumNotEq() {
398
398
//given
399
399
String query = "{ Books(where: {genre: {NOT: {EQ:PLAY}}}) { select { id title, genre } }}" ;
400
400
401
- String expected = "{Books={select=["
402
- + "{id=2, title=War and Peace, genre=NOVEL}, "
403
- + "{id=3, title=Anna Karenina, genre=NOVEL}"
404
- + "]}}" ;
401
+ String expected =
402
+ "{Books={select=[" +
403
+ "{id=2, title=War and Peace, genre=NOVEL}, " +
404
+ "{id=3, title=Anna Karenina, genre=NOVEL}" +
405
+ "]}}" ;
405
406
406
407
//when
407
408
Object result = executor .execute (query ).getData ();
@@ -433,10 +434,11 @@ public void queryForEnumNotIn() {
433
434
//given
434
435
String query = "{ Books(where: {genre: {NOT: {IN: PLAY}}}) { select { id title, genre } }}" ;
435
436
436
- String expected = "{Books={select=["
437
- + "{id=2, title=War and Peace, genre=NOVEL}, "
438
- + "{id=3, title=Anna Karenina, genre=NOVEL}"
439
- + "]}}" ;
437
+ String expected =
438
+ "{Books={select=[" +
439
+ "{id=2, title=War and Peace, genre=NOVEL}, " +
440
+ "{id=3, title=Anna Karenina, genre=NOVEL}" +
441
+ "]}}" ;
440
442
441
443
//when
442
444
Object result = executor .execute (query ).getData ();
@@ -504,31 +506,33 @@ public void queryAuthorBooksWithExplictOptional() {
504
506
@ Test
505
507
public void queryAuthorBooksWithExplictOptionalNotLike () {
506
508
//given
507
- String query = "query { "
508
- + "Authors(" +
509
- " where: {" +
510
- " books: {" +
511
- " title: {NOT: {LIKE: \" Th\" }}" +
512
- " }" +
513
- " }" +
514
- " ) {" +
515
- " select {" +
516
- " id" +
517
- " name" +
518
- " books(optional: true) {" +
519
- " id" +
520
- " title(orderBy: ASC)" +
521
- " genre" +
522
- " }" +
523
- " }" +
524
- " }"
525
- + "}" ;
526
-
527
- String expected = "{Authors={select=["
528
- + "{id=1, name=Leo Tolstoy, books=["
529
- + "{id=3, title=Anna Karenina, genre=NOVEL}, "
530
- + "{id=2, title=War and Peace, genre=NOVEL}]}"
531
- + "]}}" ;
509
+ String query =
510
+ "query { " +
511
+ "Authors(" +
512
+ " where: {" +
513
+ " books: {" +
514
+ " title: {NOT: {LIKE: \" Th\" }}" +
515
+ " }" +
516
+ " }" +
517
+ " ) {" +
518
+ " select {" +
519
+ " id" +
520
+ " name" +
521
+ " books(optional: true) {" +
522
+ " id" +
523
+ " title(orderBy: ASC)" +
524
+ " genre" +
525
+ " }" +
526
+ " }" +
527
+ " }" +
528
+ "}" ;
529
+
530
+ String expected =
531
+ "{Authors={select=[" +
532
+ "{id=1, name=Leo Tolstoy, books=[" +
533
+ "{id=3, title=Anna Karenina, genre=NOVEL}, " +
534
+ "{id=2, title=War and Peace, genre=NOVEL}]}" +
535
+ "]}}" ;
532
536
533
537
//when
534
538
Object result = executor .execute (query ).getData ();
@@ -540,33 +544,35 @@ public void queryAuthorBooksWithExplictOptionalNotLike() {
540
544
@ Test
541
545
public void queryAuthorBooksWithExplictOptionalNotLikeConjunction () {
542
546
//given
543
- String query = "query { "
544
- + "Authors(" +
545
- " where: {" +
546
- " books: {" +
547
- " AND: [{title: {NOT: {LIKE: \" War\" }}} {title: {NOT: {LIKE: \" Anna\" }}}]" +
548
- " }" +
549
- " }" +
550
- " ) {" +
551
- " select {" +
552
- " id" +
553
- " name" +
554
- " books(optional: true) {" +
555
- " id" +
556
- " title(orderBy: ASC)" +
557
- " genre" +
558
- " }" +
559
- " }" +
560
- " }"
561
- + "}" ;
562
-
563
- String expected = "{Authors={select=["
564
- + "{id=4, name=Anton Chekhov, books=["
565
- + "{id=5, title=The Cherry Orchard, genre=PLAY}, "
566
- + "{id=6, title=The Seagull, genre=PLAY}, "
567
- + "{id=7, title=Three Sisters, genre=PLAY}"
568
- + "]}"
569
- + "]}}" ;
547
+ String query =
548
+ "query { " +
549
+ "Authors(" +
550
+ " where: {" +
551
+ " books: {" +
552
+ " AND: [{title: {NOT: {LIKE: \" War\" }}} {title: {NOT: {LIKE: \" Anna\" }}}]" +
553
+ " }" +
554
+ " }" +
555
+ " ) {" +
556
+ " select {" +
557
+ " id" +
558
+ " name" +
559
+ " books(optional: true) {" +
560
+ " id" +
561
+ " title(orderBy: ASC)" +
562
+ " genre" +
563
+ " }" +
564
+ " }" +
565
+ " }" +
566
+ "}" ;
567
+
568
+ String expected =
569
+ "{Authors={select=[" +
570
+ "{id=4, name=Anton Chekhov, books=[" +
571
+ "{id=5, title=The Cherry Orchard, genre=PLAY}, " +
572
+ "{id=6, title=The Seagull, genre=PLAY}, " +
573
+ "{id=7, title=Three Sisters, genre=PLAY}" +
574
+ "]}" +
575
+ "]}}" ;
570
576
571
577
//when
572
578
Object result = executor .execute (query ).getData ();
0 commit comments