001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041: package org.netbeans.xml.test.core;
042:
043: import junit.framework.Test;
044: import junit.framework.TestSuite;
045: import junit.textui.TestRunner;
046: import org.netbeans.junit.NbTestCase;
047: import org.netbeans.junit.NbTestSuite;
048: import org.openide.ErrorManager;
049:
050: /**
051: * <P>
052: * <P>
053: * <FONT COLOR="#CC3333" FACE="Courier New, Monospaced" SIZE="+1">
054: * <B>
055: * <BR> XML Module Jemmy Test: NewFromTemplate
056: * </B>
057: * </FONT>
058: * <BR><BR><B>What it tests:</B><BR>
059: *
060: * This test tests New From Template action on all XML's templates.
061: *
062: * <BR><BR><B>How it works:</B><BR>
063: *
064: * 1) create new documents from template<BR>
065: * 2) write the created documents to output<BR>
066: * 3) close source editor<BR>
067: *
068: * <BR><BR><B>Settings:</B><BR>
069: * none<BR>
070: *
071: * <BR><BR><B>Output (Golden file):</B><BR>
072: * Set XML documents.<BR>
073: *
074: * <BR><B>To Do:</B><BR>
075: * none<BR>
076: *
077: * <P>Created on Januar 09, 2001, 12:33 PM
078: * <P>
079: */
080:
081: public class Fail extends NbTestCase {
082: public Fail(String testName) {
083: super (testName);
084: }
085:
086: // ----------------------- MAIN ---------------------------//
087:
088: public static Test suite() {
089: TestSuite suite = new NbTestSuite();
090: System.out.println("");
091: System.out.println("SUIT, ktera nahlasi exception");
092: int i = 1;
093: while (i-- > 0) {
094: try {
095: Thread.currentThread().sleep(3000);
096: } catch (InterruptedException ex) {
097: ex.printStackTrace();
098: }
099: System.out.print("jeste zbyva");
100: System.out.println(Integer.toString(i));
101: }
102: System.out.println("");
103: ErrorManager errMan = ErrorManager.getDefault();
104: errMan.notify(errMan.USER, new NullPointerException(
105: "MOJE EXCEPTION"));
106: try {
107: Thread.currentThread().sleep(10000);
108: } catch (InterruptedException ex) {
109: ex.printStackTrace();
110: }
111: // suite.addTest(new CoreTemplatesTest("testNewXMLFromTemplate"));
112: return suite;
113: }
114:
115: public static void main(String[] args) throws Exception {
116: //DEBUG = true;
117: //JemmyProperties.getCurrentTimeouts().loadDebugTimeouts();
118: TestRunner.run(suite());
119: }
120:
121: }
|