1 5 6 package org.exoplatform.services.wsrp.testConsumer; 7 8 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 |