1 19 20 package org.netbeans.modules.web.jspparser; 21 22 import java.io.File ; 23 import java.io.IOException ; 24 import java.io.PrintStream ; 25 import java.util.StringTokenizer ; 26 27 import junit.framework.*; 28 import org.netbeans.junit.*; 29 import org.netbeans.modules.web.jsps.parserapi.JspParserAPI; 30 import org.netbeans.modules.web.jsps.parserapi.JspParserFactory; 31 import org.openide.filesystems.FileObject; 32 import org.openide.filesystems.FileUtil; 33 import org.openide.filesystems.Repository; 34 35 39 public class ParserPresentTest extends NbTestCase { 40 41 44 public ParserPresentTest(String testName) { 45 super(testName); 46 } 47 48 public void testParserPresent() throws IOException { 49 JspParserAPI api = JspParserFactory.getJspParser(); 50 assertNotNull(api); 51 } 52 53 public void testSameInstance() throws IOException { 54 JspParserAPI api1 = JspParserFactory.getJspParser(); 55 JspParserAPI api2 = JspParserFactory.getJspParser(); 56 log(api1.toString()); 57 log(api2.toString()); 58 assertSame("JSP parser instance should be the same all the time", api1, api2); 59 } 60 61 } 62 | Popular Tags |