- try {
- Group group = admin.createGroup(GROUP);
-
- return admin.createUser(USER, PASSWORD, group);
- } catch (UserMgtException e) {
- TestCase.fail(e.getMessage());
- throw new RuntimeException(e);
- }
+ userAdmin.createGroup(GROUP);
+ userAdmin.createUser(USER, PASSWORD);
+ userAdmin.addUserToGroup(USER, GROUP);
+ }
+
+ // NOTE: This is only for test. Normally the user accessor would not depend
+ // on user administration. This just ensures that a user administration is created
+ // that knows about the given user.
+ public UserAdministration getUserAdmin() {
+ return userAdmin;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.wamblee.usermgt.UserAccessor#getCurrentUser()
+ */
+ public String getCurrentUser() {
+ return USER;