dion 02/05/19 15:50:57
Modified: src/test/org/apache/maven/j2ee WarFileTest.java
Log:
no message
Revision Changes Path
1.2 +36 -1
jakarta-turbine-maven/src/test/org/apache/maven/j2ee/WarFileTest.java
Index: WarFileTest.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/test/org/apache/maven/j2ee/WarFileTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WarFileTest.java 15 May 2002 15:09:32 -0000 1.1
+++ WarFileTest.java 19 May 2002 22:50:57 -0000 1.2
@@ -70,7 +70,7 @@
* Unit test for {@link WarFile}.
*
* @author <a href="mailto:[EMAIL PROTECTED]">dIon Gillard</a>
- * @version $Id: WarFileTest.java,v 1.1 2002/05/15 15:09:32 dion Exp $
+ * @version $Id: WarFileTest.java,v 1.2 2002/05/19 22:50:57 dion Exp $
*/
public class WarFileTest extends TestCase
{
@@ -84,6 +84,10 @@
private String simpleWarFile;
/** file name for dummy war (two dummy servlets) */
private String dummyWarFile;
+ /** file name for dummy jsp war (dummy war + a jsp-file entry) */
+ private String dummyJspWarFile;
+ /** file name for dummy taglib war (dummy war + 2 taglibs) */
+ private String dummyTaglibWarFile;
/** Creates a new instance of WarFileTest
* @param testName the name of the test
@@ -108,6 +112,8 @@
manifestOnlyWarFile = baseDir + fs + "src/test-j2ee/manifest-only.war";
simpleWarFile = baseDir + fs + "src/test-j2ee/simple.war";
dummyWarFile = baseDir + fs + "src/test-j2ee/dummy-servlet.war";
+ dummyJspWarFile = baseDir + fs + "src/test-j2ee/dummy-jsp.war";
+ dummyTaglibWarFile = baseDir + fs + "src/test-j2ee/dummy-taglib.war";
}
/**
@@ -214,4 +220,33 @@
i++;
}
}
+
+ /** test that the dummy jsp war returns two servlets
+ * @throws Exception when there is an unexpected problem
+ */
+ public void testDummyJspWar() throws Exception
+ {
+ instance = new WarFile(dummyJspWarFile);
+ assertEquals("Number of jsps is wrong", 1,
+ instance.getJSPs().size());
+ assertTrue("List of jsps doesn't contain /a.jsp",
+ instance.getJSPs().values().contains("/a.jsp"));
+ assertEquals("Number of taglibs is wrong", 0,
+ instance.getTaglibs().size());
+ }
+
+ /** test that the dummy taglib war returns two taglibs
+ * @throws Exception when there is an unexpected problem
+ */
+ public void testDummyTaglibWar() throws Exception
+ {
+ instance = new WarFile(dummyTaglibWarFile);
+ assertEquals("Number of taglibs is wrong", 2,
+ instance.getTaglibs().size());
+ assertTrue("List of taglibs doesn't contain /WEB-INF/a.tld",
+ instance.getTaglibs().values().contains("/WEB-INF/a.tld"));
+ assertTrue("List of taglibs doesn't contain /WEB-INF/b.tld",
+ instance.getTaglibs().values().contains("/WEB-INF/b.tld"));
+ }
+
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>