components/src/test/java/eu/internetofus/common/components/social_context_builder/WeNetSocialContextBuilderSimulatorTest.java
/**
   * Should manage the social notification interaction.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should manage the social notification interaction.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should manage the social notification interaction . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldSetGetDeleteSocialNotificationInteraction(final Vertx vertx, final VertxTestContext testContext) {
    final var message = new UserMessageTest().createModelExample(1);
    WeNetSocialContextBuilderSimulator.createProxy(vertx).socialNotificationInteraction(message)
        .compose(any -> WeNetSocialContextBuilderSimulator.createProxy(vertx).getSocialNotificationInteraction())
        .onComplete(
            testContext.succeeding(getted -> testContext.verify(() -> {
              assertThat(getted).isNotEmpty().hasSizeGreaterThanOrEqualTo(1);
              assertThat(getted.get(getted.size() - 1)).isEqualTo(message);
              WeNetSocialContextBuilderSimulator.createProxy(vertx).deleteSocialNotificationInteraction()
                  .compose(
                      any -> WeNetSocialContextBuilderSimulator.createProxy(vertx).getSocialNotificationInteraction())
                  .onComplete(
                      testContext.succeeding(empty -> testContext.verify(() -> {
                        assertThat(empty).isEmpty();
                        testContext.completeNow();
                      })));
            })));
  }
@ Test public void shouldSetGetDeleteSocialNotificationInteraction ( final Vertx vertx , final VertxTestContext testContext ) { final var message = new UserMessageTest ( ) . createModelExample ( 1 ) ; WeNetSocialContextBuilderSimulator . createProxy ( vertx ) . socialNotificationInteraction ( message ) . compose ( any -> WeNetSocialContextBuilderSimulator . createProxy ( vertx ) . getSocialNotificationInteraction ( ) ) . onComplete ( testContext . succeeding ( getted -> testContext . verify ( ( ) -> { assertThat ( getted ) . isNotEmpty ( ) . hasSizeGreaterThanOrEqualTo ( 1 ) ; assertThat ( getted . get ( getted . size ( ) - 1 ) ) . isEqualTo ( message ) ; WeNetSocialContextBuilderSimulator . createProxy ( vertx ) . deleteSocialNotificationInteraction ( ) . compose ( any -> WeNetSocialContextBuilderSimulator . createProxy ( vertx ) . getSocialNotificationInteraction ( ) ) . onComplete ( testContext . succeeding ( empty -> testContext . verify ( ( ) -> { assertThat ( empty ) . isEmpty ( ) ; testContext . completeNow ( ) ; } ) ) ) ; } ) ) ) ; }
Should manage the social notification interaction.
Should manage the social notification interaction .