@Test public void testGetUser_nonExisting() { RestInvocations.loadProjectUsers(handler); Assert.assertNull(projectUserService.getUser("nonExisting")); }
public User getUser(String username) { for(User user: getUserList()) { if(user.getUsername().equals(username)) { return user; } } return null; }
ProjectUserService extends AbstractCachingService<Integer, UserList, AbstractCachingService.Callback<UserList>> { public User getUser(String username) { for(User user: getUserList()) { if(user.getUsername().equals(username)) { return user; } } return null; } }
ProjectUserService extends AbstractCachingService<Integer, UserList, AbstractCachingService.Callback<UserList>> { public User getUser(String username) { for(User user: getUserList()) { if(user.getUsername().equals(username)) { return user; } } return null; } ProjectUserService(Project project); }
ProjectUserService extends AbstractCachingService<Integer, UserList, AbstractCachingService.Callback<UserList>> { public User getUser(String username) { for(User user: getUserList()) { if(user.getUsername().equals(username)) { return user; } } return null; } ProjectUserService(Project project); void loadUsersAsync(Callback<UserList> callback); User tryGetUser(String username); void loadUserAsync(final String username, final Callback<User> callback); UserList getUserList(); User getUser(String username); String getUserFullName(String username); }
ProjectUserService extends AbstractCachingService<Integer, UserList, AbstractCachingService.Callback<UserList>> { public User getUser(String username) { for(User user: getUserList()) { if(user.getUsername().equals(username)) { return user; } } return null; } ProjectUserService(Project project); void loadUsersAsync(Callback<UserList> callback); User tryGetUser(String username); void loadUserAsync(final String username, final Callback<User> callback); UserList getUserList(); User getUser(String username); String getUserFullName(String username);  }