vertx/src/test/java/eu/internetofus/common/vertx/RepositoryIT.java
/**
   * Should not aggregate page because order is wrong.
   *
   * @param vertx       event bus to use.
   * @param testContext context for the test.
   */
Should not aggregate page because order is wrong.
@param vertx       event bus to use.
@param testContext context for the test.
Should not aggregate page because order is wrong . @param vertx event bus to use . @param testContext context for the test .
@Test
  public void shouldNotAggregatePageObjectBecauseOrderIsNotValid(final Vertx vertx,
      final VertxTestContext testContext) {
    final var repository = new Repository(vertx, pool, "schemaVersion");
    final var query = new JsonObject().put("index", new JsonObject().put("$mod", new JsonArray().add(2).add(0)));
    final var order = new JsonObject().put("$undefinedAction", new JsonObject().put("field", new JsonObject()));
    repository.aggregatePageObject(TEN_AGGREGATION_COLLECTION, query, order, 0, 10, "children.grandChildren.elders")
        .onComplete(testContext.failing(error -> testContext.completeNow()));
  }
@ Test public void shouldNotAggregatePageObjectBecauseOrderIsNotValid ( final Vertx vertx , final VertxTestContext testContext ) { final var repository = new Repository ( vertx , pool , "schemaVersion" ) ; final var query = new JsonObject ( ) . put ( "index" , new JsonObject ( ) . put ( "$mod" , new JsonArray ( ) . add ( 2 ) . add ( 0 ) ) ) ; final var order = new JsonObject ( ) . put ( "$undefinedAction" , new JsonObject ( ) . put ( "field" , new JsonObject ( ) ) ) ; repository . aggregatePageObject ( TEN_AGGREGATION_COLLECTION , query , order , 0 , 10 , "children.grandChildren.elders" ) . onComplete ( testContext . failing ( error -> testContext . completeNow ( ) ) ) ; }
Should not aggregate page because order is wrong.
Should not aggregate page because order is wrong .