components/src/test/java/eu/internetofus/common/components/models/WeNetUserProfileTest.java
/**
   * Create an basic model that has the specified index.
   *
   * @param index to use in the example.
   *
   * @return the basic example.
   */
Create an basic model that has the specified index.
@param index to use in the example.

@return the basic example.
Create an basic model that has the specified index . @param index to use in the example . @return the basic example .
public WeNetUserProfile createBasicExample(final int index) {
    final var model = new WeNetUserProfile();
    model.id = null;
    model.name = new UserNameTest().createModelExample(index);
    model.dateOfBirth = new AliveBirthDateTest().createModelExample(index);
    model.gender = WeNetUserProfile.GENDERS[index % WeNetUserProfile.GENDERS.length];
    model.email = "user" + index + "@internetofus.eu";
    model.phoneNumber = "+34 987 65 43 " + (10 + index % 90);
    model.locale = LOCALES[index % LOCALES.length];
    model.avatar = "https://internetofus.eu/wp-content/uploads/sites/38/2019/" + index + "/WeNet_logo.png";
    model.nationality = NATIONALITIES[index % NATIONALITIES.length];
    model.norms = new ArrayList<>();
    model.norms.add(new ProtocolNormTest().createModelExample(index));
    model.occupation = OCCUPATIONS[index % OCCUPATIONS.length];
    model.hasLocations = index % 2 == 0;
    model._creationTs = 1234567891 + index;
    model._lastUpdateTs = 1234567991 + index * 2;
    return model;
  }
public WeNetUserProfile createBasicExample ( final int index ) { final var model = new WeNetUserProfile ( ) ; model . id = null ; model . name = new UserNameTest ( ) . createModelExample ( index ) ; model . dateOfBirth = new AliveBirthDateTest ( ) . createModelExample ( index ) ; model . gender = WeNetUserProfile . GENDERS [ index % WeNetUserProfile . GENDERS . length ] ; model . email = "user" + index + "@internetofus.eu" ; model . phoneNumber = "+34 987 65 43 " + ( 10 + index % 90 ) ; model . locale = LOCALES [ index % LOCALES . length ] ; model . avatar = "https://internetofus.eu/wp-content/uploads/sites/38/2019/" + index + "/WeNet_logo.png" ; model . nationality = NATIONALITIES [ index % NATIONALITIES . length ] ; model . norms = new ArrayList < > ( ) ; model . norms . add ( new ProtocolNormTest ( ) . createModelExample ( index ) ) ; model . occupation = OCCUPATIONS [ index % OCCUPATIONS . length ] ; model . hasLocations = index % 2 == 0 ; model . _creationTs = 1234567891 + index ; model . _lastUpdateTs = 1234567991 + index * 2 ; return model ; }
Create an basic model that has the specified index.
Create an basic model that has the specified index .