From b1297fd9e477bca9be06cc575d08ffe57024b915 Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 26 Apr 2010 20:17:26 +0000 Subject: [PATCH] --- .../wamblee/usermgt/InMemoryGroupSetTest.java | 20 +++++++++---------- .../wamblee/usermgt/InMemoryUserSetTest.java | 2 -- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/security/impl/src/test/java/org/wamblee/usermgt/InMemoryGroupSetTest.java b/security/impl/src/test/java/org/wamblee/usermgt/InMemoryGroupSetTest.java index a97adcca..9a65a143 100644 --- a/security/impl/src/test/java/org/wamblee/usermgt/InMemoryGroupSetTest.java +++ b/security/impl/src/test/java/org/wamblee/usermgt/InMemoryGroupSetTest.java @@ -56,7 +56,7 @@ public class InMemoryGroupSetTest extends TestCase { * Group to check for existence. * */ - protected void checkGroupExists(String aGroup) throws SQLException { + protected void checkGroupExists(String aGroup) throws Exception { // Empty } @@ -67,7 +67,7 @@ public class InMemoryGroupSetTest extends TestCase { * Group to check for non-existence. * */ - protected void checkGroupNotExists(String aGroup) throws SQLException { + protected void checkGroupNotExists(String aGroup) throws Exception { // Empty } @@ -78,7 +78,7 @@ public class InMemoryGroupSetTest extends TestCase { * Expected number of groups. * */ - protected void checkGroupCount(int aSize) throws SQLException { + protected void checkGroupCount(int aSize) throws Exception { assertEquals(aSize, groups.size()); } @@ -87,7 +87,7 @@ public class InMemoryGroupSetTest extends TestCase { * and contains(). * */ - public void testAdd() throws SQLException { + public void testAdd() throws Exception { Group group = new Group("group1"); assertTrue(groups.add(group)); checkGroupExists(group.getName()); @@ -106,7 +106,7 @@ public class InMemoryGroupSetTest extends TestCase { * Tries to find a non-existing group. Verifies that null is returned. * */ - public void testFindUnknownGroup() throws SQLException { + public void testFindUnknownGroup() throws Exception { Group group1 = new Group("group1"); Group group2 = new Group("group2"); groups.add(group1); @@ -122,7 +122,7 @@ public class InMemoryGroupSetTest extends TestCase { * Adds duplicate group. Verifies that the existing group is left untouched. * */ - public void testAddDuplicateGroup() throws SQLException { + public void testAddDuplicateGroup() throws Exception { Group group1 = new Group("group1"); groups.add(group1); @@ -141,7 +141,7 @@ public class InMemoryGroupSetTest extends TestCase { * is true. * */ - public void testRemoveGroup() throws SQLException { + public void testRemoveGroup() throws Exception { Group group1 = new Group("group1"); groups.add(group1); assertTrue(groups.contains(group1)); @@ -159,14 +159,12 @@ public class InMemoryGroupSetTest extends TestCase { * the return value is true. * */ - public void testRemoveNonExistingGroup() throws SQLException { + public void testRemoveNonExistingGroup() throws Exception { Group group1 = new Group("group1"); groups.add(group1); checkGroupCount(1); Group nonExistingGroup = new Group("group2"); - nonExistingGroup.setPrimaryKey(new Long(1000)); - nonExistingGroup.setPersistedVersion(1000); assertFalse(groups.remove(nonExistingGroup)); assertTrue(groups.contains(group1)); assertEquals(1, groups.list().size()); @@ -178,7 +176,7 @@ public class InMemoryGroupSetTest extends TestCase { * all. * */ - public void testList() throws SQLException { + public void testList() throws Exception { Group group1 = new Group("group1"); Group group2 = new Group("group2"); Group group3 = new Group("group3"); diff --git a/security/impl/src/test/java/org/wamblee/usermgt/InMemoryUserSetTest.java b/security/impl/src/test/java/org/wamblee/usermgt/InMemoryUserSetTest.java index 98e585dc..d242727f 100644 --- a/security/impl/src/test/java/org/wamblee/usermgt/InMemoryUserSetTest.java +++ b/security/impl/src/test/java/org/wamblee/usermgt/InMemoryUserSetTest.java @@ -251,8 +251,6 @@ public class InMemoryUserSetTest extends TestCase { checkUserCount(1); User nonExistingUser = createUser("user2", PASSWORD, group); - nonExistingUser.setPrimaryKey(new Long(1000)); - nonExistingUser.setPersistedVersion(10); assertFalse(users.remove(nonExistingUser)); assertTrue(users.contains(user1)); assertEquals(1, users.list().size()); -- 2.31.1