Author: thorsten
Date: Fri Sep 12 15:34:18 2008
New Revision: 694829
URL: http://svn.apache.org/viewvc?rev=694829&view=rev
Log:
Adding Structurer test case and test structurer
Added:
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java
(with props)
Modified:
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.structurer.xml
Added:
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java?rev=694829&view=auto
==============================================================================
---
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java
(added)
+++
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java
Fri Sep 12 15:34:18 2008
@@ -0,0 +1,18 @@
+package org.apache.forrest.dispatcher;
+
+import java.io.InputStream;
+
+import org.apache.forrest.dispatcher.impl.XMLStructurer;
+
+import junit.framework.TestCase;
+
+public class TestStructurer extends TestCase {
+ private static final String STRUCTURER_XML = "master.structurer.xml";
+ public void testStructurer() throws DispatcherException{
+ InputStream
dataStream=this.getClass().getResourceAsStream(STRUCTURER_XML);
+ String format="html";
+ XMLStructurer structurer = new XMLStructurer(dataStream, format);
+ structurer.setContractUriPrefix("/org/apache/forrest/dispatcher/");
+ structurer.execute();
+ }
+}
Propchange:
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/TestStructurer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.structurer.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.structurer.xml?rev=694829&r1=694828&r2=694829&view=diff
==============================================================================
---
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.structurer.xml
(original)
+++
forrest/trunk/whiteboard/dispatcher/testing/org/apache/forrest/dispatcher/master.structurer.xml
Fri Sep 12 15:34:18 2008
@@ -15,9 +15,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<structur>
- <structurer type="html" hooksXpath="/html/body">
- <contract name="m2"/>
+<structurer xmlns="http://apache.org/forrest/templates/2.0" >
+ <structure type="html" hooksXpath="/html/body">
<contract name="master">
<property name="test-inline-xml">
<css url="common.css"/>
@@ -25,10 +24,10 @@
</property>
<property name="test-inline" value="test"/>
</contract>
- </structurer>
- <structurer type="xml" hooksXpath="/">
+ </structure>
+ <structure type="xml" hooksXpath="/">
<contract name="master">
<property name="test" value="test"/>
</contract>
- </structurer>
-</structur>
+ </structure>
+</structurer>