01: /**
02: * $Id: AMCommunityTest.java,v 1.2 2005/06/27 22:22:27 jtb Exp $
03: * Copyright 2005 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.community.mc.test;
14:
15: import java.util.Collections;
16: import java.util.HashSet;
17: import junit.framework.*;
18: import java.util.Set;
19:
20: import com.sun.portal.community.mc.*;
21: import com.sun.portal.community.mc.ConfigTable.ConfigKey;
22: import com.sun.portal.community.mc.impl.Debug;
23: import com.iplanet.am.util.SystemProperties;
24: import com.sun.identity.security.AdminTokenAction;
25:
26: public abstract class AMCommunityTest extends TestCase {
27: protected static final String ORG_MEMBER_DP = "*** org member ***";
28:
29: protected ConfigKey orgMemberCk;
30:
31: protected CMCPrincipal orgCp;
32: protected CMCNode orgNode;
33:
34: protected String xUserName;
35: protected String yUserName;
36: protected String zUserName;
37:
38: protected CMCUser xUser;
39:
40: public AMCommunityTest(String testName) {
41: super (testName);
42: }
43:
44: protected void setUp() throws java.lang.Exception {
45: super .setUp();
46: Debug.log("AMCommunityTest", "setUp", "called");
47:
48: orgCp = new CMCPrincipal("am-org", "dc=red,dc=iplanet,dc=com");
49: xUserName = "uid=xUser,ou=people,dc=red,dc=iplanet,dc=com";
50:
51: orgMemberCk = new ConfigKey(orgCp, CMCRolePrincipal.MEMBER_ROLE);
52:
53: try {
54: orgNode = CMCFactory.getInstance().getCMCNode(orgCp);
55: xUser = CMCFactory.getInstance().getCMCUser(xUserName);
56: } catch (CMCException ce) {
57: Debug.log("AMCommunityTest", "setUp", ce);
58: fail(ce.getMessage());
59: }
60: }
61:
62: protected void tearDown() throws java.lang.Exception {
63: super .tearDown();
64: Debug.log("AMCommunityTest", "tearDown", "called");
65: }
66: }
|