KickJava   Java API By Example, From Geeks To Geeks.

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


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  * StatusTest.java
26  * JUnit based test
27  *
28  * Created on March 28, 2004, 12:55 AM
29  */

30
31 package com.sun.enterprise.config.backup;
32
33 import com.sun.enterprise.config.backup.util.FileUtils;
34 import java.io.*;
35 import java.util.*;
36 import java.util.zip.*;
37 import junit.framework.*;
38
39 /**
40  *
41  * @author Byron Nevins
42  */

43 public class StatusTest extends TestCase
44 {
45     
46     public StatusTest(java.lang.String JavaDoc testName)
47     {
48         super(testName);
49     }
50     
51     public static Test suite()
52     {
53         TestSuite suite = new TestSuite(StatusTest.class);
54         return suite;
55     }
56     
57     /** Test of write method, of class com.sun.enterprise.config.backup.Status. */
58     public void testWrite()
59     {
60         System.out.println("testWrite");
61     }
62     
63     /** Test of read method, of class com.sun.enterprise.config.backup.Status. */
64     public void testRead()
65     {
66         System.out.println("*************** testRead - terse\n");
67
68         File f = new File("C:/tmp/domains/domain1/backups/no-status.zip");
69         Status s = new Status();
70         System.out.println(s.read(f, true));
71         System.out.println("\n*************** testRead - verbose\n");
72         System.out.println(s.read(f, false));
73     }
74     
75     /** Test of delete method, of class com.sun.enterprise.config.backup.Status. */
76     public void testDelete()
77     {
78     }
79     
80     public static void main(java.lang.String JavaDoc[] args)
81     {
82         junit.textui.TestRunner.run(suite());
83     }
84     
85     // Add test methods here, they have to start with 'test' name.
86
// for example:
87
// public void testHello() {}
88

89     
90 }
91
Popular Tags