/*
- * Copyright 2005 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */
+ */
package org.wamblee.usermgt;
import junit.framework.TestCase;
import java.util.Set;
-
/**
* Tests the inmemory group set. Intended to be subclassed for other
* implementations of group set.
*/
public class InMemoryGroupSetTest extends TestCase {
- /**
- * DOCUMENT ME!
- */
- protected GroupSet groups;
+ private GroupSet groups;
/**
* This method must be overriden in subclasses.
- *
+ *
* @return New group set object.
*/
protected GroupSet createGroupSet() {
return new InMemoryGroupSet();
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.wamblee.test.SpringTestCase#setUp()
*/
- /**
- * DOCUMENT ME!
- *
- * @throws Exception DOCUMENT ME!
- */
@Override
protected void setUp() throws Exception {
super.setUp();
/**
* Additional check to be implemented by a subclass.
- *
- * @param aGroup Group to check for existence.
- *
- * @throws SQLException DOCUMENT ME!
+ *
+ * @param aGroup
+ * Group to check for existence.
+ *
*/
protected void checkGroupExists(String aGroup) throws SQLException {
// Empty
/**
* Additional check to be implemented by a subclass.
- *
- * @param aGroup Group to check for non-existence.
- *
- * @throws SQLException DOCUMENT ME!
+ *
+ * @param aGroup
+ * Group to check for non-existence.
+ *
*/
protected void checkGroupNotExists(String aGroup) throws SQLException {
// Empty
/**
* Additional check to be implemented by a subclass.
- *
- * @param aSize Expected number of groups.
- *
- * @throws SQLException DOCUMENT ME!
+ *
+ * @param aSize
+ * Expected number of groups.
+ *
*/
protected void checkGroupCount(int aSize) throws SQLException {
assertEquals(aSize, groups.size());
}
/**
- * Adds a group and verifies that the group is added using find(),
- * list(), and contains().
- *
- * @throws SQLException DOCUMENT ME!
+ * Adds a group and verifies that the group is added using find(), list(),
+ * and contains().
+ *
*/
public void testAdd() throws SQLException {
Group group = new Group("group1");
}
/**
- * Tries to find a non-existing group. Verifies that null is
- * returned.
- *
- * @throws SQLException DOCUMENT ME!
+ * Tries to find a non-existing group. Verifies that null is returned.
+ *
*/
public void testFindUnknownGroup() throws SQLException {
Group group1 = new Group("group1");
}
/**
- * Adds duplicate group. Verifies that the existing group is left
- * untouched.
- *
- * @throws SQLException DOCUMENT ME!
+ * Adds duplicate group. Verifies that the existing group is left untouched.
+ *
*/
public void testAddDuplicateGroup() throws SQLException {
Group group1 = new Group("group1");
}
/**
- * Removes a group. Verifies that the group is removed and the
- * return value is true.
- *
- * @throws SQLException DOCUMENT ME!
+ * Removes a group. Verifies that the group is removed and the return value
+ * is true.
+ *
*/
public void testRemoveGroup() throws SQLException {
Group group1 = new Group("group1");
}
/**
- * Removes a non-existing group. Verifies that no groups are
- * removed an that the return value is true.
- *
- * @throws SQLException DOCUMENT ME!
+ * Removes a non-existing group. Verifies that no groups are removed an that
+ * the return value is true.
+ *
*/
public void testRemoveNonExistingGroup() throws SQLException {
Group group1 = new Group("group1");
}
/**
- * Adds a number of groups to the set and verifies that list()
- * returns them all.
- *
- * @throws SQLException DOCUMENT ME!
+ * Adds a number of groups to the set and verifies that list() returns them
+ * all.
+ *
*/
public void testList() throws SQLException {
Group group1 = new Group("group1");