01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.rewriter.util.test;
06:
07: import com.sun.portal.rewriter.test.util.BasicTestCase;
08: import com.sun.portal.rewriter.util.ConfigManager;
09: import junit.framework.TestSuite;
10:
11: import java.io.ByteArrayOutputStream;
12: import java.io.PrintStream;
13:
14: public class TestConfigManager extends BasicTestCase {
15: public TestConfigManager(String aName) {
16: super (aName);
17: }//constuctor
18:
19: public void testComponentPanic() {
20: PrintStream p = System.err;
21: try {
22: System.setErr(new PrintStream(new ByteArrayOutputStream()));
23: String fileName = "/resources/abc.html";
24: ConfigManager.main(new String[] { fileName });
25: fail("Not Supposed to Find the Non existance file:"
26: + fileName);
27: } catch (RuntimeException e) {
28: assertTrue(true);
29: }
30:
31: System.setErr(p);
32: new RuntimeException("eee");
33: }//testComponentPanic()
34:
35: public static void main(String[] args) {
36: //BasicTestCase.run( TestConfigManager.class );
37:
38: TestSuite testSuite = new TestSuite();
39: testSuite.addTest(new TestConfigManager("testNormalization"));
40: BasicTestCase.run(testSuite);
41: }//main()
42:
43: }//class TestConfigManager
|