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:
042: /*
043: * UnitTestSuite.java
044: *
045: * Created on November 1, 2001, 6:17 PM
046: */
047:
048: package org.netbeans.xtest.pe.xmlbeans;
049:
050: import java.io.*;
051:
052: /**
053: *
054: * @author mb115822
055: */
056: public class UnitTestSuite extends XMLBean {
057:
058: /** Creates new UnitTestSuite */
059: public UnitTestSuite() {
060: }
061:
062: /** Getter for property testsError.
063: * @return Value of property testsError.
064: */
065: public long getTestsError() {
066: return xmlat_testsError;
067: }
068:
069: /** Setter for property testsError.
070: * @param testsError New value of property testsError.
071: */
072: public void setTestsError(long testsError) {
073: xmlat_testsError = testsError;
074: }
075:
076: /** Getter for property testsFail.
077: * @return Value of property testsFail.
078: */
079: public long getTestsFail() {
080: return xmlat_testsFail;
081: }
082:
083: /** Setter for property testsFail.
084: * @param testsFail New value of property testsFail.
085: */
086: public void setTestsFail(long testsFail) {
087: xmlat_testsFail = testsFail;
088: }
089:
090: /** Getter for property testsPass.
091: * @return Value of property testsPass.
092: */
093: public long getTestsPass() {
094: return xmlat_testsPass;
095: }
096:
097: /** Setter for property testsPass.
098: * @param testsPass New value of property testsPass.
099: */
100: public void setTestsPass(long testsPass) {
101: xmlat_testsPass = testsPass;
102: }
103:
104: /** Getter for property testsUnexpectedPass.
105: * @return Value of property testsUnexpectedPass.
106: */
107: public long getTestsUnexpectedPass() {
108: return xmlat_testsUnexpectedPass;
109: }
110:
111: /** Setter for property testsUnexpectedPass.
112: * @param testsPass New value of property testsUnexpectedPass.
113: */
114: public void setTestsUnexpectedPass(long testsUnexpectedPass) {
115: xmlat_testsUnexpectedPass = testsUnexpectedPass;
116: }
117:
118: /** Getter for property testsExpectedFail.
119: * @return Value of property testsExpectedFail.
120: */
121: public long getTestsExpectedFail() {
122: return xmlat_testsExpectedFail;
123: }
124:
125: /** Setter for property testsExpectedFail.
126: * @param testsExpectedFail New value of property testsExpectedFail.
127: */
128: public void setTestsExpectedFail(long testsExpectedFail) {
129: xmlat_testsExpectedFail = testsExpectedFail;
130: }
131:
132: /** Getter for property testsTotal.
133: * @return Value of property testsTotal.
134: */
135: public long getTestsTotal() {
136: return xmlat_testsTotal;
137: }
138:
139: /** Setter for property testsTotal.
140: * @param testsTotal New value of property testsTotal.
141: */
142: public void setTestsTotal(long testsTotal) {
143: xmlat_testsTotal = testsTotal;
144: }
145:
146: /** Getter for property name.
147: * @return Value of property name.
148: */
149: public String getName() {
150: return xmlat_name;
151: }
152:
153: /** Setter for property name.
154: * @param name New value of property name.
155: */
156: public void setName(String name) {
157: xmlat_name = name;
158: }
159:
160: /** Getter for property timeStamp.
161: * @return Value of property timeStamp.
162: */
163: public java.sql.Timestamp getTimeStamp() {
164: return xmlat_timeStamp;
165: }
166:
167: /** Setter for property timeStamp.
168: * @param timeStamp New value of property timeStamp.
169: */
170: public void setTimeStamp(java.sql.Timestamp timeStamp) {
171: xmlat_timeStamp = timeStamp;
172: }
173:
174: /** Getter for property time.
175: * @return Value of property time.
176: */
177: public long getTime() {
178: return xmlat_time;
179: }
180:
181: /** Setter for property time.
182: * @param time New value of property time.
183: */
184: public void setTime(long time) {
185: xmlat_time = time;
186: }
187:
188: /** Getter for property unexpectedFailure.
189: * @return Value of property unexpectedFailure.
190: */
191: public String getUnexpectedFailure() {
192: return xmlat_unexpectedFailure;
193: }
194:
195: /** Setter for property unexpectedFailure.
196: * @param unexpectedFailure New value of property unexpectedFailure.
197: */
198: public void setUnexpectedFailure(String unexpectedFailure) {
199: xmlat_unexpectedFailure = unexpectedFailure;
200: }
201:
202: /** Getter for property testBag_id.
203: * @return Value of property testBag_id.
204: */
205: public long getTestBag_id() {
206: return this .testBag_id;
207: }
208:
209: /** Setter for property testBag_id.
210: * @param testBag_id New value of property testBag_id.
211: */
212: public void setTestBag_id(long testBag_id) {
213: this .testBag_id = testBag_id;
214: }
215:
216: // attributes
217: public String xmlat_name;
218: public java.sql.Timestamp xmlat_timeStamp;
219: public long xmlat_time;
220: public long xmlat_testsTotal;
221: public long xmlat_testsPass;
222: public long xmlat_testsFail;
223: public long xmlat_testsError;
224: public long xmlat_testsUnexpectedPass;
225: public long xmlat_testsExpectedFail;
226: public String xmlat_unexpectedFailure;
227:
228: // child elements
229: public UnitTestCase[] xmlel_UnitTestCase;
230: public Data[] xmlel_Data;
231:
232: /** Holds value of property testBag_id. */
233: private long testBag_id;
234:
235: // load UnitTestSuite from a file
236: public static UnitTestSuite loadFromFile(File aFile)
237: throws IOException, ClassNotFoundException {
238: XMLBean xmlBean = XMLBean.loadXMLBean(aFile);
239: if (!(xmlBean instanceof UnitTestSuite)) {
240: throw new ClassNotFoundException("Loaded file " + aFile
241: + " does not contain UnitTestSuite");
242: }
243: return (UnitTestSuite) xmlBean;
244: }
245:
246: }
|