components/src/test/java/eu/internetofus/common/components/incentive_server/WeNetIncentiveServerSimulatorTest.java
/**
   * Should manage the social notification.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should manage the social notification.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should manage the social notification . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldSetGetDeleteTaskTypeStatus(final Vertx vertx, final VertxTestContext testContext) {
    final var body = new TaskTypeStatusBodyTest().createModelExample(1);
    WeNetIncentiveServerSimulator.createProxy(vertx).updateTaskTypeStatus(body)
        .compose(any -> WeNetIncentiveServerSimulator.createProxy(vertx).getTaskTypeStatus()).onComplete(
            testContext.succeeding(getted -> testContext.verify(() -> {
              assertThat(getted).isNotEmpty().hasSizeGreaterThanOrEqualTo(1);
              assertThat(getted.get(getted.size() - 1)).isEqualTo(body);
              WeNetIncentiveServerSimulator.createProxy(vertx).deleteTaskTypeStatus()
                  .compose(any -> WeNetIncentiveServerSimulator.createProxy(vertx).getTaskTypeStatus()).onComplete(
                      testContext.succeeding(empty -> testContext.verify(() -> {
                        assertThat(empty).isEmpty();
                        testContext.completeNow();
                      })));
            })));
  }
@ Test public void shouldSetGetDeleteTaskTypeStatus ( final Vertx vertx , final VertxTestContext testContext ) { final var body = new TaskTypeStatusBodyTest ( ) . createModelExample ( 1 ) ; WeNetIncentiveServerSimulator . createProxy ( vertx ) . updateTaskTypeStatus ( body ) . compose ( any -> WeNetIncentiveServerSimulator . createProxy ( vertx ) . getTaskTypeStatus ( ) ) . onComplete ( testContext . succeeding ( getted -> testContext . verify ( ( ) -> { assertThat ( getted ) . isNotEmpty ( ) . hasSizeGreaterThanOrEqualTo ( 1 ) ; assertThat ( getted . get ( getted . size ( ) - 1 ) ) . isEqualTo ( body ) ; WeNetIncentiveServerSimulator . createProxy ( vertx ) . deleteTaskTypeStatus ( ) . compose ( any -> WeNetIncentiveServerSimulator . createProxy ( vertx ) . getTaskTypeStatus ( ) ) . onComplete ( testContext . succeeding ( empty -> testContext . verify ( ( ) -> { assertThat ( empty ) . isEmpty ( ) ; testContext . completeNow ( ) ; } ) ) ) ; } ) ) ) ; }
Should manage the social notification.
Should manage the social notification .