added GroupNotFoundException and UserNotFoundException

This commit is contained in:
Sebastian Sdorra
2013-01-29 20:39:08 +01:00
parent a5c24f54d5
commit 65c80b14fb
6 changed files with 210 additions and 10 deletions

View File

@@ -125,6 +125,19 @@ public abstract class UserManagerTestBase
assertNull(manager.get("zaphod"));
}
/**
* Method description
*
*
* @throws IOException
* @throws UserException
*/
@Test(expected = UserNotFoundException.class)
public void testDeleteNotFound() throws UserException, IOException
{
manager.delete(UserTestData.createDent());
}
/**
* Method description
*
@@ -253,9 +266,7 @@ public abstract class UserManagerTestBase
@Test(expected = UserException.class)
public void testModifyNotExisting() throws UserException, IOException
{
User zaphod = UserTestData.createZaphod();
manager.modify(zaphod);
manager.modify(UserTestData.createZaphod());
}
/**
@@ -324,6 +335,19 @@ public abstract class UserManagerTestBase
assertEquals(zaphod.getDisplayName(), "Zaphod Beeblebrox");
}
/**
* Method description
*
*
* @throws IOException
* @throws UserException
*/
@Test(expected = UserNotFoundException.class)
public void testRefreshNotFound() throws UserException, IOException
{
manager.refresh(UserTestData.createDent());
}
/**
* Method description
*