01: /**
02: * $Id: FileStatCommunityTest.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.ConfigTable.ConfigKey;
21: import com.sun.portal.community.mc.*;
22: import com.sun.portal.community.mc.impl.Debug;
23:
24: public abstract class FileStatCommunityTest extends TestCase {
25: protected static final String ORG_MEMBER_DP = "*** org member ***";
26:
27: protected ConfigKey orgMemberCk;
28:
29: protected CMCPrincipal orgCp;
30: protected CMCNode orgNode;
31:
32: protected String xUserName;
33: protected String yUserName;
34: protected String zUserName;
35:
36: protected CMCUser xUser;
37:
38: public FileStatCommunityTest(String testName) {
39: super (testName);
40: }
41:
42: protected void setUp() throws java.lang.Exception {
43: super .setUp();
44: Debug.log("FileStatCommunityTest", "setUp", "called");
45:
46: orgCp = new CMCPrincipal("filestat", "org");
47: xUserName = "xUser";
48:
49: orgMemberCk = new ConfigKey(orgCp, CMCRolePrincipal.MEMBER_ROLE);
50:
51: try {
52: orgNode = CMCFactory.getInstance().getCMCNode(orgCp);
53: xUser = CMCFactory.getInstance().getCMCUser(xUserName);
54: } catch (CMCException ce) {
55: Debug.log("FileDynamicCommunityUserTest", "setUp", ce);
56: fail(ce.getMessage());
57: }
58: }
59:
60: protected void tearDown() throws java.lang.Exception {
61: super .tearDown();
62: Debug.log("FileStatCommunityTest", "tearDown", "called");
63: }
64:
65: public void setDPDocuments() throws CMCException {
66: Debug.log("FileStatCommunityTest", "setDPDocuments", "called");
67:
68: ConfigTable dpDocs = new ConfigTable();
69:
70: dpDocs.put(orgMemberCk, ORG_MEMBER_DP);
71:
72: orgNode.setDPDocuments(dpDocs);
73: }
74: }
|