1 package net.firstpartners.nounit.test; 2 3 26 27 import org.jdom.*; 28 import org.jdom.input.*; 29 30 import junit.framework.TestCase; 31 32 import org.gjt.jclasslib.io.*; 33 import org.gjt.jclasslib.structures.*; 34 35 import java.io.*; 36 37 40 public class TestData extends TestCase { 41 42 46 public TestData() { 47 super(""); 48 } 49 50 55 public TestData( String name ) { 56 super( name ); 57 } 58 59 63 public static File getSampleFile() 64 throws IOException { 65 66 File sampleFile = new File(SAMPLE_CLASS_PROXY); 68 return sampleFile; 69 } 70 71 75 public static ClassFile getSampleClassFile() 76 throws InvalidByteCodeException , IOException { 77 78 File sampleFile = getSampleFile(); 80 81 return ClassFileReader.readFromFile(sampleFile); 83 } 84 85 90 public static Document getSimpleXmlDocument () 91 throws JDOMException , IOException { 92 93 SAXBuilder builder = new SAXBuilder(); 95 Document sourceDocument = builder.build(new File(XML_SIMPLE_OUTPUT)); 96 97 return sourceDocument; 98 } 99 100 103 public final static String SAMPLE_CLASS_PROXY = 104 "G:\\NoUnitFiles\\net\\firstpartners\\nounit\\test\\ProxyBean.class"; 105 106 109 public final static String SAMPLE_CLASS_SOURCE_FULL="G:\\NoUnitFiles\\"; 110 111 114 public final static String SAMPLE_CLASS_SOURCE = 115 "G:\\NoUnitFiles\\net\\firstpartners\\nounit\\utility\\"; 116 117 120 public static final String XML_SIMPLE_OUTPUT = 121 "G:\\NoUnitFiles\\xml\\project.xml"; 122 123 126 public static final String XML_CALLS_OUTPUT = 127 "G:\\NoUnitFiles\\xml\\nounit-calls.xml"; 128 129 } 130 | Popular Tags |