assertEquals("One user in group expected", 1, projectNode.getChildCount());
assertEquals("Invalid user node", bob.getName(), projectNode.getChildAt(0).toString());
}
public void test2Users2Projects() throws Exception {
MockUser bob = new MockUser("bob", null);
MockUser alice = new MockUser("alice", null);
bob.setProjects(new String[]{"bobProject"});
alice.setProjects(new String[]{"aliceProject"});
FoundUsersModel model = createModel(Arrays.asList(new User[]{bob, alice}));
assertEquals("Two projects expected", 2, getRoot(model).getChildCount());
assertEquals("One user per project expected", 1, getRoot(model).getChildAt(0).getChildCount());
assertEquals("One user per project expected", 1, getRoot(model).getChildAt(1).getChildCount());
}