CVS: Tapestry/junit/src/net/sf/tapestry/junit/mock TestDefaultComponentClass.xml,NONE,1.1.2.1 TestOverrideDefaultComponentClass.xml,NONE,1.1.2.1 TestExternal.xml,1.2.2.1,1.2.2.2 MockTestCase.java,1.10.2.13,1.10.2.14
Howard Lewis Ship <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tapestry/Tapestry/junit/src/net/sf/tapestry/junit/mock
In directory sc8-pr-cvs1:/tmp/cvs-serv7911/junit/src/net/sf/tapestry/junit/mock
Modified Files:
Tag: hship-2-3
TestExternal.xml MockTestCase.java
Added Files:
Tag: hship-2-3
TestDefaultComponentClass.xml
TestOverrideDefaultComponentClass.xml
Log Message:
Add tests for new features introduced in the specification 1.4 DTD.
--- NEW FILE: TestDefaultComponentClass.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: TestDefaultComponentClass.xml,v 1.1.2.1 2003/01/02 03:04:26 hship Exp $ -->
<mock-test>
<context name="c7" root="context7"/>
<servlet name="chatty" class="net.sf.tapestry.ApplicationServlet"/>
<request>
<assert-output name="Page Title">
<![CDATA[
<title>Default Class</title>
]]>
</assert-output>
<assert-output name="Page Class">
Page class: net.sf.tapestry.html.BasePage
</assert-output>
<assert-output name="Component Class">
Hello! I'm Chatty and my class is net.sf.tapestry.BaseComponent
</assert-output>
</request>
</mock-test>
--- NEW FILE: TestOverrideDefaultComponentClass.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: TestOverrideDefaultComponentClass.xml,v 1.1.2.1 2003/01/02 03:04:26 hship Exp $ -->
<mock-test>
<context name="c7" root="context7"/>
<servlet name="chatty" class="net.sf.tapestry.ApplicationServlet">
<init-parameter
name="net.sf.tapestry.default-page-class"
value="net.sf.tapestry.junit.mock.c7.Home"/>
</servlet>
<request>
<assert-output name="Page Title">
<![CDATA[
<title>Default Class</title>
]]>
</assert-output>
<assert-output name="Page Class">
Page class: net.sf.tapestry.junit.mock.c7.Home
</assert-output>
<assert-output name="Component Class">
Hello! I'm Chatty and my class is net.sf.tapestry.BaseComponent
</assert-output>
</request>
</mock-test>
Index: TestExternal.xml
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/junit/src/net/sf/tapestry/junit/mock/TestExternal.xml,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** TestExternal.xml 4 Dec 2002 20:22:17 -0000 1.2.2.1
--- TestExternal.xml 2 Jan 2003 03:04:26 -0000 1.2.2.2
***************
*** 18,22 ****
--- 18,24 ----
<assert-output name="Page Title">
+ <![CDATA[
<title>ServiceTest Page</title>
+ ]]>
</assert-output>
***************
*** 28,33 ****
-
-
</request>
--- 30,33 ----
***************
*** 73,77 ****
<assert-output name="Page Title">
<![CDATA[
! <title>Exception</title>
]]>
</assert-output>
--- 73,77 ----
<assert-output name="Page Title">
<![CDATA[
! <title>Exception</title>
]]>
</assert-output>
***************
*** 91,95 ****
<assert-output name="Page Title">
<![CDATA[
! <title>Exception</title>
]]>
</assert-output>
--- 91,95 ----
<assert-output name="Page Title">
<![CDATA[
! <title>Exception</title>
]]>
</assert-output>
Index: MockTestCase.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/junit/src/net/sf/tapestry/junit/mock/MockTestCase.java,v
retrieving revision 1.10.2.13
retrieving revision 1.10.2.14
diff -C2 -d -r1.10.2.13 -r1.10.2.14
*** MockTestCase.java 30 Dec 2002 03:04:57 -0000 1.10.2.13
--- MockTestCase.java 2 Jan 2003 03:04:26 -0000 1.10.2.14
***************
*** 42,45 ****
--- 42,68 ----
+ /**
+ * Test that default class names for pages and components work.
+ *
+ **/
+
+ public void testDefaultComponentClass()
+ throws Exception
+ {
+ attempt("TestDefaultComponentClass.xml");
+ }
+
+ /**
+ * Test that the default class for pages can be overridden
+ * with a configuration parameter.
+ *
+ **/
+
+ public void testOverrideDefaultComponentClass()
+ throws Exception
+ {
+ attempt("TestOverrideDefaultComponentClass.xml");
+ }
+
public void testPersistentProperties()
throws Exception
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf