Exemplo n.º 1
0
  private static Circle circleWithName(String name) {
    List<User> members = new ArrayList<>();
    for (int i = 0; i < generator.nextInt(fakeUsers.size()); i++) {
      members.add(fakeUsers.get(generator.nextInt(fakeUsers.size())));
    }

    Circle circle = new Circle();
    circle.setName(name);
    for (User member : members) {
      circle.addMember(member);
      member.addCircle(circle);
    }

    return circle;
  }
Exemplo n.º 2
0
  private static User userWithName(String name) {
    User user = new User();

    user.setName(name);
    user.setEmail("");
    user.setImageUrl(
        "https://cloud.githubusercontent.com/assets/1068249/10568603/4ddda6ac-75cf-11e5-8016-8d0c504c0051.png");
    user.setFacebookId(randomId());
    if (name.equals("Hasham Ali")) {
      String s = "Oo7iDf8gIH";
      user.setObjectId(s);
    }
    return user;
  }