Search in sources :

Example 16 with CUserManager

use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.

the class CUserManagerTest method addUserTestCorrectArgument.

@Test
public void addUserTestCorrectArgument() throws CouldntSaveDataException {
    final CUserManager manager = CUserManager.get(m_sql);
    final MockUserManagerListener listener = new MockUserManagerListener();
    manager.addListener(listener);
    manager.addUser(" ADD USER CORRECT ARGUMENTS ");
    assertEquals("addedUser;", listener.m_events.get(0));
}
Also used : CUserManager(com.google.security.zynamics.binnavi.Gui.Users.CUserManager) Test(org.junit.Test)

Example 17 with CUserManager

use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.

the class CUserManagerTest method setCurrentActiveUserCorrectArgumentsTest.

@Test
public void setCurrentActiveUserCorrectArgumentsTest() throws CouldntSaveDataException {
    final CUserManager manager = CUserManager.get(m_sql);
    final IUser user = manager.addUser(" TEST SET CURRENT ACTIVE USER ");
    manager.setCurrentActiveUser(user);
}
Also used : IUser(com.google.security.zynamics.binnavi.Gui.Users.Interfaces.IUser) CUserManager(com.google.security.zynamics.binnavi.Gui.Users.CUserManager) Test(org.junit.Test)

Example 18 with CUserManager

use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.

the class CUserManagerTest method setCurrentActiveUserWrongArgumentsTest.

@Test(expected = NullPointerException.class)
public void setCurrentActiveUserWrongArgumentsTest() {
    final CUserManager manager = CUserManager.get(m_sql);
    manager.setCurrentActiveUser(null);
}
Also used : CUserManager(com.google.security.zynamics.binnavi.Gui.Users.CUserManager) Test(org.junit.Test)

Example 19 with CUserManager

use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.

the class CUserManagerTest method deleteUserWrongArgumentTest1.

@Test(expected = NullPointerException.class)
public void deleteUserWrongArgumentTest1() throws CouldntDeleteException {
    final CUserManager manager = CUserManager.get(m_sql);
    manager.deleteUser(null);
}
Also used : CUserManager(com.google.security.zynamics.binnavi.Gui.Users.CUserManager) Test(org.junit.Test)

Example 20 with CUserManager

use of com.google.security.zynamics.binnavi.Gui.Users.CUserManager in project binnavi by google.

the class CUserManagerTest method editUserWrongArgumentsTest2.

@Test(expected = NullPointerException.class)
public void editUserWrongArgumentsTest2() throws CouldntSaveDataException {
    final CUserManager manager = CUserManager.get(m_sql);
    final IUser user = manager.addUser("TEST USER 12412");
    manager.editUserName(user, null);
}
Also used : IUser(com.google.security.zynamics.binnavi.Gui.Users.Interfaces.IUser) CUserManager(com.google.security.zynamics.binnavi.Gui.Users.CUserManager) Test(org.junit.Test)

Aggregations

CUserManager (com.google.security.zynamics.binnavi.Gui.Users.CUserManager)22 Test (org.junit.Test)20 IUser (com.google.security.zynamics.binnavi.Gui.Users.Interfaces.IUser)11 IComment (com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.Interfaces.IComment)4 MockSqlProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockSqlProvider)3 CComment (com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.CComment)3 CTag (com.google.security.zynamics.binnavi.Tagging.CTag)3 CouldntLoadDataException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntLoadDataException)2 CouldntSaveDataException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException)2 CUser (com.google.security.zynamics.binnavi.Gui.Users.CUser)2 CGroupNode (com.google.security.zynamics.binnavi.disassembly.CGroupNode)2 CModule (com.google.security.zynamics.binnavi.disassembly.Modules.CModule)2 MockModule (com.google.security.zynamics.binnavi.disassembly.Modules.MockModule)2 Date (java.util.Date)2 CModuleViewGenerator (com.google.security.zynamics.binnavi.Database.CModuleViewGenerator)1 SQLProvider (com.google.security.zynamics.binnavi.Database.Interfaces.SQLProvider)1 MockDatabase (com.google.security.zynamics.binnavi.Database.MockClasses.MockDatabase)1 MaybeNullException (com.google.security.zynamics.binnavi.Exceptions.MaybeNullException)1 MockTagManager (com.google.security.zynamics.binnavi.Tagging.MockTagManager)1 CCodeNode (com.google.security.zynamics.binnavi.disassembly.CCodeNode)1