1 package net.firstpartners.nounit.reader.bytecode.test; 2 3 26 27 28 import junit.framework.*; 29 30 import net.firstpartners.nounit.reader.*; 31 import net.firstpartners.nounit.reader.bytecode.*; 32 import net.firstpartners.nounit.snippet.*; 33 import net.firstpartners.nounit.test.*; 34 35 import org.apache.log4j.Logger; 36 37 41 public class TestByteCodeProjectSnippetFactory extends TestCase { 42 43 static Logger log = Logger.getLogger(TestByteCodeProjectSnippetFactory.class); 45 46 50 public TestByteCodeProjectSnippetFactory(String name) { 51 super(name); 52 } 53 54 57 public void setUp(){ 58 59 } 60 61 64 protected void tearDown() 65 { 66 67 } 68 69 73 public static void main(String [] args) { 74 junit.textui.TestRunner.run (suite()); 75 } 76 77 81 public static Test suite() { 82 return new TestSuite(TestByteCodeProjectSnippetFactory.class); 83 } 84 85 public void testGetSnippetInfo() throws Exception { 86 87 Snippets javaInformation; 89 String info; 90 String sourceDirectory = TestData.SAMPLE_CLASS_SOURCE_FULL; 91 92 ISnippetFactory myFactory = new ByteCodeProjectSnippetFactory(sourceDirectory); 94 javaInformation = myFactory.getSnippets(); 95 info = javaInformation.toString(); 96 97 98 log.debug(info); 99 100 assertTrue(info.indexOf("roject")>-1); 101 assertTrue(info.indexOf("package location")>-1); 102 assertTrue(info.indexOf("public net.firstpartners.nounit")>-1); 103 104 } 105 106 107 108 } | Popular Tags |