JET

edu.utep.cs.jet.gui.tester
Class JUnitExporter

java.lang.Object
  extended by edu.utep.cs.jet.gui.tester.JUnitExporter

public class JUnitExporter
extends Object

A utility class to export generated test cases as JUnit tests. The produced JUnit test classes can be compiled and executed independently of the ET tool. This class can be used to export (1) all the test cases of a set of methods, and (2) a chosen set of test cases of a method (refer to the public APIs for details).

Version:
$Revision: 1.17 $
Author:
Perla M. Escarcega and Yoonsik Cheon

Constructor Summary
protected JUnitExporter(edu.utep.cs.jet.gui.tester.EtTestCase[] testcases, File file)
          Creates a JUnit exporter to export the given set of test cases of the given method to the given file.
protected JUnitExporter(List<edu.utep.cs.jet.gui.tester.EtMethod> methods, File file)
          Creates a JUnit exporter to export all the test cases of the given method to the given file.
 
Method Summary
 void export()
          Exports test cases as a JUnit test class.
static void export(edu.utep.cs.jet.gui.tester.EtTestCase[] testcases, File dir)
          Exports the given test cases of the given method as JUnit tests.
static void export(List<edu.utep.cs.jet.gui.tester.EtMethod> methods, File dir)
          Exports all the test cases of the given methods as JUnit tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitExporter

protected JUnitExporter(List<edu.utep.cs.jet.gui.tester.EtMethod> methods,
                        File file)
Creates a JUnit exporter to export all the test cases of the given method to the given file.


JUnitExporter

protected JUnitExporter(edu.utep.cs.jet.gui.tester.EtTestCase[] testcases,
                        File file)
Creates a JUnit exporter to export the given set of test cases of the given method to the given file.

Method Detail

export

public static void export(List<edu.utep.cs.jet.gui.tester.EtMethod> methods,
                          File dir)
Exports all the test cases of the given methods as JUnit tests. A user will be prompt for the file name of the JUnit test class. By default, the file will be stored in the given directory; if the given directory is not a directory but a file, its parent will be used.


export

public static void export(edu.utep.cs.jet.gui.tester.EtTestCase[] testcases,
                          File dir)
Exports the given test cases of the given method as JUnit tests. A user will be prompt for the file name of the JUnit test class. By default, the file will be stored in the given directory; if the given directory is not a directory but a file, its parent will be used.


export

public void export()
            throws IOException
Exports test cases as a JUnit test class. The user is prompted for the file name to store the test class.

Throws:
IOException

JET

JET is Copyright (C) 2005-2008 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.