protocols/src/test/java/eu/internetofus/common/protocols/Ask4HelpV2ProtocolWithAllFiltersITC.java
/**
   * Store the relationships with the requester profile.
   *
   * @param vertx       event bus to use.
   * @param testContext context to do the test.
   */
Store the relationships with the requester profile.
@param vertx       event bus to use.
@param testContext context to do the test.
Store the relationships with the requester profile . @param vertx event bus to use . @param testContext context to do the test .
@Test
  @Order(6)
  public void shouldStoreRelationships(final Vertx vertx, final VertxTestContext testContext) {
    this.assertLastSuccessfulTestWas(5, testContext);
    final var sourceId = this.users.get(0).id;
    final var relationships = new ArrayList<SocialNetworkRelationship>();
    final var max = this.users.size();
    for (var i = 1; i < max; i++) {
      final var relationship = new SocialNetworkRelationship();
      relationship.appId = this.app.appId;
      relationship.type = SocialNetworkRelationshipType.values()[i % SocialNetworkRelationshipType.values().length];
      relationship.sourceId = sourceId;
      relationship.targetId = this.users.get(i).id;
      relationship.weight = 0.1 * i;
      relationships.add(relationship);
    }
    WeNetProfileManager.createProxy(vertx).addOrUpdateSocialNetworkRelationships(relationships)
        .onComplete(testContext.succeeding(ignored -> this.assertSuccessfulCompleted(testContext)));
  }
@ Test @ Order ( 6 ) public void shouldStoreRelationships ( final Vertx vertx , final VertxTestContext testContext ) { this . assertLastSuccessfulTestWas ( 5 , testContext ) ; final var sourceId = this . users . get ( 0 ) . id ; final var relationships = new ArrayList < SocialNetworkRelationship > ( ) ; final var max = this . users . size ( ) ; for ( var i = 1 ; i < max ; i ++ ) { final var relationship = new SocialNetworkRelationship ( ) ; relationship . appId = this . app . appId ; relationship . type = SocialNetworkRelationshipType . values ( ) [ i % SocialNetworkRelationshipType . values ( ) . length ] ; relationship . sourceId = sourceId ; relationship . targetId = this . users . get ( i ) . id ; relationship . weight = 0.1 * i ; relationships . add ( relationship ) ; } WeNetProfileManager . createProxy ( vertx ) . addOrUpdateSocialNetworkRelationships ( relationships ) . onComplete ( testContext . succeeding ( ignored -> this . assertSuccessfulCompleted ( testContext ) ) ) ; }
Store the relationships with the requester profile.
Store the relationships with the requester profile .