Ejemplo n.º 1
0
  @Test
  public void testCreateUsersWithList() throws Exception {
    User user1 = createUser();
    user1.setUsername("abc123");
    User user2 = createUser();
    user2.setUsername("123abc");

    api.createUsersWithListInput(Arrays.asList(new User[] {user1, user2}));

    User fetched = api.getUserByName(user1.getUsername());
    assertEquals(user1.getId(), fetched.getId());
  }
Ejemplo n.º 2
0
  private User createUser() {
    User user = new User();
    user.setId(System.currentTimeMillis());
    user.setUsername("fred");
    user.setFirstName("Fred");
    user.setLastName("Meyer");
    user.setEmail("*****@*****.**");
    user.setPassword("xxXXxx");
    user.setPhone("408-867-5309");
    user.setUserStatus(123);

    return user;
  }