01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)TestSeviceUnitInfo.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi.ui.common;
30:
31: import com.sun.jbi.ui.common.JBIManagementMessage;
32: import java.io.BufferedReader;
33: import java.io.InputStream;
34: import java.io.InputStreamReader;
35: import java.io.PrintWriter;
36: import java.io.StringWriter;
37: import junit.framework.TestCase;
38: import java.util.*;
39:
40: /**
41: * test class
42: * @author Sun Microsystems, Inc.
43: */
44: public class TestSeviceUnitInfo extends TestCase {
45:
46: /**
47: * Creates a new instance of TestMgmtMessage
48: * @param aTestName name
49: */
50: public TestSeviceUnitInfo(String aTestName) {
51: super (aTestName);
52: }
53:
54: /**
55: * test sucess msg
56: * @throws Exception on error
57: */
58: public void testServiceUnitInfo() throws Exception {
59: List list = getTestData1();
60:
61: for (Iterator itr = list.iterator(); itr.hasNext();) {
62: System.out.println(itr.next());
63: }
64: }
65:
66: /** test data
67: * @return test list objects
68: */
69: public static List getTestData1() {
70: ArrayList list = new ArrayList();
71:
72: ServiceUnitInfo info1 = new ServiceUnitInfo("su21 Name",
73: "su21 desc", "su target name21",
74: ServiceUnitInfo.SHUTDOWN_STATE);
75:
76: list.add(info1);
77:
78: return list;
79: }
80:
81: /**
82: * main
83: * @param args the command line arguments
84: */
85: public static void main(String[] args) {
86: // TODO code application logic here
87: try {
88: new TestSeviceUnitInfo("test").testServiceUnitInfo();
89: } catch (Exception ex) {
90: ex.printStackTrace();
91: }
92: }
93: }
|