use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.
the class CUserManagerTest method removeListenerTest.
@Test
public void removeListenerTest() {
final CUserManager manager = CUserManager.get(m_sql);
final MockUserManagerListener listener = new MockUserManagerListener();
manager.addListener(listener);
assertTrue(Iterators.contains(manager.getListeners(), listener));
manager.removeListener(listener);
assertFalse(Iterators.contains(manager.getListeners(), listener));
}
use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.
the class CUserManagerTest method editUserWrongArgumentsTest1.
@Test(expected = NullPointerException.class)
public void editUserWrongArgumentsTest1() throws CouldntSaveDataException {
final CUserManager manager = CUserManager.get(m_sql);
manager.editUserName(null, null);
}
use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.
the class CUserManagerTest method addListenerTest.
@Test
public void addListenerTest() {
final CUserManager manager = CUserManager.get(m_sql);
final MockUserManagerListener listener = new MockUserManagerListener();
manager.addListener(listener);
assertEquals(1, Iterators.size(manager.getListeners()));
assertTrue(Iterators.contains(manager.getListeners(), listener));
}
use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.
the class CUserManagerTest method getCurrentActiveUserTest.
@Test
public void getCurrentActiveUserTest() throws CouldntSaveDataException {
final CUserManager manager = CUserManager.get(m_sql);
final IUser activeUser = manager.addUser(" ACTIVE USER ");
manager.setCurrentActiveUser(activeUser);
assertEquals(activeUser, manager.getCurrentActiveUser());
}
use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.
the class CUserManagerTest method getCurrentActiveUserTestFail.
@Test(expected = IllegalStateException.class)
public void getCurrentActiveUserTestFail() {
final CUserManager manager = CUserManager.get(m_sql);
manager.getCurrentActiveUser();
}
Aggregations