components/src/test/java/eu/internetofus/common/components/social_context_builder/WeNetSocialContextBuilderSimulatorTest.java
/**
   * Should manage the social preferences answer update.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should manage the social preferences answer update.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should manage the social preferences answer update . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldSetGetSocialPreferencesSelectedAnswerForUserOnTask(final Vertx vertx,
      final VertxTestContext testContext) {
    final var userId = "1";
    final var taskId = "2";
    final var userAnswers = new UserAnswersTest().createModelExample(0);
    WeNetSocialContextBuilderSimulator.createProxy(vertx)
        .putSocialPreferencesSelectedAnswerForUserOnTask(userId, taskId, 0, userAnswers)
        .compose(any -> WeNetSocialContextBuilderSimulator.createProxy(vertx)
            .getSocialPreferencesSelectedAnswerForUserOnTask(userId, taskId, 0))
        .onComplete(
            testContext.succeeding(getted -> testContext.verify(() -> {
              assertThat(getted).isEqualTo(userAnswers);
              testContext.completeNow();
            })));
  }
@ Test public void shouldSetGetSocialPreferencesSelectedAnswerForUserOnTask ( final Vertx vertx , final VertxTestContext testContext ) { final var userId = "1" ; final var taskId = "2" ; final var userAnswers = new UserAnswersTest ( ) . createModelExample ( 0 ) ; WeNetSocialContextBuilderSimulator . createProxy ( vertx ) . putSocialPreferencesSelectedAnswerForUserOnTask ( userId , taskId , 0 , userAnswers ) . compose ( any -> WeNetSocialContextBuilderSimulator . createProxy ( vertx ) . getSocialPreferencesSelectedAnswerForUserOnTask ( userId , taskId , 0 ) ) . onComplete ( testContext . succeeding ( getted -> testContext . verify ( ( ) -> { assertThat ( getted ) . isEqualTo ( userAnswers ) ; testContext . completeNow ( ) ; } ) ) ) ; }
Should manage the social preferences answer update.
Should manage the social preferences answer update .