KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > testConsumer > TestUserRegistry


1 /*
2 * Copyright 2001-2004 The eXo platform SARL All rights reserved.
3 * Please look at license.txt in info directory for more license detail.
4 */

5
6 package org.exoplatform.services.wsrp.testConsumer;
7
8 /*
9  * @author Mestrallet Benjamin
10  * benjmestrallet@users.sourceforge.net
11  * Date: 5 févr. 2004
12  * Time: 18:31:05
13  */

14
15 public class TestUserRegistry extends BaseTest{
16
17   public void testAddUser(){
18     userRegistry.addUser(createUser("userID"));
19     assertTrue(userRegistry.getAllUsers().hasNext());
20     assertNotNull(userRegistry.getUser("userID"));
21   }
22
23   public void testRemoveUser(){
24     userRegistry.addUser(createUser("userID"));
25     userRegistry.addUser(createUser("userID2"));
26     userRegistry.addUser(createUser("userID3"));
27     userRegistry.removeUser("userID3");
28     assertNull(userRegistry.getUser("userID3"));
29     userRegistry.removeAllUsers();
30     assertFalse(userRegistry.getAllUsers().hasNext());
31   }
32
33 }
Popular Tags