KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > backup > ListManagerTest


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24
25 /*
26  * ListManagerTest.java
27  * JUnit based test
28  *
29  * Created on March 30, 2004, 9:07 PM
30  */

31
32 package com.sun.enterprise.config.backup;
33
34 import junit.framework.*;
35
36 /**
37  *
38  * @author bnevins
39  */

40 public class ListManagerTest extends TestCase
41 {
42     
43     public ListManagerTest(java.lang.String JavaDoc testName)
44     {
45         super(testName);
46     }
47     
48     public static Test suite()
49     {
50         TestSuite suite = new TestSuite(ListManagerTest.class);
51         return suite;
52     }
53     
54     /** Test of foo method, of class com.sun.enterprise.config.backup.ListManager. */
55     public void testListManager()
56     {
57         System.out.println("testListManager");
58         
59         try
60         {
61             BackupRequest req = new BackupRequest("C:/tmp/domains", "domain1");
62             ListManager listMgr = new ListManager(req);
63             System.out.println(listMgr.list());
64         }
65         catch(BackupException be)
66         {
67             fail("Got an unexpected BackupException: " + be);
68         }
69         catch(Exception JavaDoc e)
70         {
71             fail("Got an unexpected BackupException: " + e);
72         }
73     }
74     
75     public static void main(java.lang.String JavaDoc[] args)
76     {
77         junit.textui.TestRunner.run(suite());
78     }
79     
80     // Add test methods here, they have to start with 'test' name.
81
// for example:
82
// public void testHello() {}
83

84     
85 }
86
Popular Tags