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: * TestBag.java
044: *
045: * Created on November 1, 2001, 6:20 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 TestBag extends XMLBean {
057:
058: /** Creates new TestBag */
059: public TestBag() {
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 module.
161: * @return Value of property module.
162: */
163: public String getModule() {
164: return xmlat_module;
165: }
166:
167: /** Setter for property module.
168: * @param module New value of property module.
169: */
170: public void setModule(String module) {
171: xmlat_module = module;
172: }
173:
174: /** Getter for property testType.
175: * @return Value of property testType.
176: */
177: public String getTestType() {
178: return xmlat_testType;
179: }
180:
181: /** Setter for property testType.
182: * @param testType New value of property testType.
183: */
184: public void setTestType(String testType) {
185: xmlat_testType = testType;
186: }
187:
188: /** Getter for property executor.
189: * @return Value of property executor.
190: */
191: public String getExecutor() {
192: return xmlat_executor;
193: }
194:
195: /** Setter for property executor.
196: * @param executor New value of property executor.
197: */
198: public void setExecutor(String executor) {
199: xmlat_executor = executor;
200: }
201:
202: /** Getter for property testAttribs.
203: * @return Value of property testAttribs.
204: */
205: public String getTestAttribs() {
206: return xmlat_testAttribs;
207: }
208:
209: /** Setter for property testAttribs.
210: * @param testAttribs New value of property testAttribs.
211: */
212: public void setTestAttribs(String testAttribs) {
213: xmlat_testAttribs = testAttribs;
214: }
215:
216: /** Getter for property timeStamp.
217: * @return Value of property timeStamp.
218: */
219: public java.sql.Timestamp getTimeStamp() {
220: return xmlat_timeStamp;
221: }
222:
223: /** Setter for property timeStamp.
224: * @param timeStamp New value of property timeStamp.
225: */
226: public void setTimeStamp(java.sql.Timestamp timeStamp) {
227: xmlat_timeStamp = timeStamp;
228: }
229:
230: /** Getter for property time.
231: * @return Value of property time.
232: */
233: public long getTime() {
234: return xmlat_time;
235: }
236:
237: /** Setter for property time.
238: * @param time New value of property time.
239: */
240: public void setTime(long time) {
241: xmlat_time = time;
242: }
243:
244: /** Getter for property bagID.
245: * @return Value of property bagID.
246: */
247: public String getBagID() {
248: return xmlat_bagID;
249: }
250:
251: /** Setter for property bagID.
252: * @param bagID New value of property bagID.
253: */
254: public void setBagID(String bagID) {
255: xmlat_bagID = bagID;
256: }
257:
258: /** Getter for property unexpectedFailure.
259: * @return Value of property unexpectedFailure.
260: */
261: public String getUnexpectedFailure() {
262: return xmlat_unexpectedFailure;
263: }
264:
265: /** Setter for property unexpectedFailure.
266: * @param unexpectedFailure New value of property unexpectedFailure.
267: */
268: public void setUnexpectedFailure(String unexpectedFailure) {
269: xmlat_unexpectedFailure = unexpectedFailure;
270: }
271:
272: /** Getter for property testRun_id.
273: * @return Value of property testRun_id.
274: */
275: public String getRunID() {
276: return this .runID;
277: }
278:
279: /** getter for property xtestResultsReport_id.
280: * @param testRun_id New value of property testRun_id.
281: */
282: public long getXTestResultsReport_id() {
283: return this .xtestResultsReport_id;
284: }
285:
286: /** Setter for property testRun_id.
287: * @param testRun_id New value of property testRun_id.
288: */
289: public void setRunID(String runID) {
290: this .runID = runID;
291: }
292:
293: /** Setter for property xtestResultsReport_id.
294: * @param testRun_id New value of property testRun_id.
295: */
296: public void setXTestResultsReport_id(long xtestResultsReport_id) {
297: this .xtestResultsReport_id = xtestResultsReport_id;
298: }
299:
300: // attributes
301: public String xmlat_name;
302: public String xmlat_module;
303: public String xmlat_testType;
304: public String xmlat_executor;
305: public String xmlat_testAttribs;
306: public java.sql.Timestamp xmlat_timeStamp;
307: public long xmlat_time;
308: public long xmlat_testsTotal;
309: public long xmlat_testsPass;
310: public long xmlat_testsFail;
311: public long xmlat_testsUnexpectedPass;
312: public long xmlat_testsExpectedFail;
313: public long xmlat_testsError;
314:
315: public boolean xmlat_ideUserDir = false;
316:
317: public String xmlat_bagID;
318:
319: public String xmlat_unexpectedFailure;
320:
321: // child elements
322: public UnitTestSuite[] xmlel_UnitTestSuite;
323:
324: /** Holds value of property testRun_id. */
325: private String runID;
326: // test run id
327: private long xtestResultsReport_id;
328:
329: // load TestBag from a file
330: public static TestBag loadFromFile(File aFile) throws IOException,
331: ClassNotFoundException {
332: XMLBean xmlBean = XMLBean.loadXMLBean(aFile);
333: if (!(xmlBean instanceof TestBag)) {
334: throw new ClassNotFoundException("Loaded file " + aFile
335: + " does not contain TestBag");
336: }
337: return (TestBag) xmlBean;
338: }
339:
340: }
|