You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2005/10/20 08:28:25 UTC
svn commit: r326838 [4/4] - in /cocoon/blocks:
ajax/trunk/java/org/apache/cocoon/ajax/
ajax/trunk/java/org/apache/cocoon/ajax/resources/js/
ajax/trunk/java/org/apache/cocoon/transformation/ ajax/trunk/samples/
forms/trunk/java/org/apache/cocoon/forms/ ...
Modified: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java (original)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java Wed Oct 19 23:26:53 2005
@@ -26,7 +26,7 @@
import javax.xml.transform.stream.StreamResult;
import org.apache.cocoon.core.container.ContainerTestCase;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
import org.apache.cocoon.xml.dom.DOMBuilder;
import org.apache.excalibur.source.impl.ResourceSource;
import org.custommonkey.xmlunit.Diff;
@@ -73,7 +73,7 @@
ResourceSource source =
new ResourceSource("resource://org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.source.xml");
Document sourceDoc = parser.parse(source.getInputStream());
- Element datatypeElement = (Element) sourceDoc.getElementsByTagNameNS(Constants.DEFINITION_NS, "convertor").item(0);
+ Element datatypeElement = (Element) sourceDoc.getElementsByTagNameNS(FormsConstants.DEFINITION_NS, "convertor").item(0);
Datatype datatype = datatypeManager.createDatatype(datatypeElement, false);
DynamicSelectionList list =
new DynamicSelectionList(datatype, null, this.getManager());
@@ -97,8 +97,8 @@
// DIRTY HACK WARNING: we add the "xmlns:wi" attribute reported
// by DOM, as expected, but not generated by the method under test,
// otherwise the comparison would fail.
- actual.getDocumentElement().setAttribute(Constants.INSTANCE_PREFIX,
- Constants.INSTANCE_NS);
+ actual.getDocumentElement().setAttribute(FormsConstants.INSTANCE_PREFIX,
+ FormsConstants.INSTANCE_NS);
Diff diff = new Diff(expected, actual);
assertTrue(message + ", " + diff.toString(), diff.similar());
}
Modified: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java (original)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java Wed Oct 19 23:26:53 2005
@@ -27,7 +27,7 @@
import org.apache.cocoon.transformation.I18nTransformer;
import org.apache.cocoon.core.container.ContainerTestCase;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
import org.apache.cocoon.forms.datatype.typeimpl.EnumType;
import org.apache.cocoon.xml.dom.DOMBuilder;
import org.apache.excalibur.source.impl.ResourceSource;
@@ -111,8 +111,8 @@
// DIRTY HACK WARNING: we add the "xmlns:*" attributes reported
// by DOM, as expected, but not generated by the method under test,
// otherwise the comparison would fail.
- actual.getDocumentElement().setAttribute(Constants.INSTANCE_PREFIX,
- Constants.INSTANCE_NS);
+ actual.getDocumentElement().setAttribute(FormsConstants.INSTANCE_PREFIX,
+ FormsConstants.INSTANCE_NS);
actual.getDocumentElement().setAttribute("i18n",
I18nTransformer.I18N_NAMESPACE_URI);
Diff diff = new Diff(expected, actual);
Modified: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java (original)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java Wed Oct 19 23:26:53 2005
@@ -37,7 +37,7 @@
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.mock.MockRequest;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
import org.apache.cocoon.xml.dom.DOMBuilder;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.impl.ResourceSource;
@@ -93,7 +93,7 @@
Context context = new DefaultContext(contextObjectModel);
Source sampleSource = new ResourceSource("resource://org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.source.xml");
Document sample = parser.parse(sampleSource.getInputStream());
- Element datatypeElement = (Element) sample.getElementsByTagNameNS(Constants.DEFINITION_NS, "datatype").item(0);
+ Element datatypeElement = (Element) sample.getElementsByTagNameNS(FormsConstants.DEFINITION_NS, "datatype").item(0);
Datatype datatype = datatypeManager.createDatatype(datatypeElement, false);
FlowJXPathSelectionList list = new FlowJXPathSelectionList
(context, "beans", "key", "value", datatype,null,false,null,false);
@@ -124,7 +124,7 @@
Context context = new DefaultContext(contextObjectModel);
Source sampleSource = new ResourceSource("resource://org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.source.xml");
Document sample = parser.parse(sampleSource.getInputStream());
- Element datatypeElement = (Element) sample.getElementsByTagNameNS(Constants.DEFINITION_NS, "datatype").item(0);
+ Element datatypeElement = (Element) sample.getElementsByTagNameNS(FormsConstants.DEFINITION_NS, "datatype").item(0);
Datatype datatype = datatypeManager.createDatatype(datatypeElement, false);
FlowJXPathSelectionList list = new FlowJXPathSelectionList
(context, "beans", "key", "value", datatype,null,false,null,false);
@@ -148,8 +148,8 @@
// DIRTY HACK WARNING: we add the "xmlns:wi" attribute reported
// by DOM, as expected, but not generated by the method under test,
// otherwise the comparison would fail.
- actual.getDocumentElement().setAttribute(Constants.INSTANCE_PREFIX,
- Constants.INSTANCE_NS);
+ actual.getDocumentElement().setAttribute(FormsConstants.INSTANCE_PREFIX,
+ FormsConstants.INSTANCE_NS);
Diff diff = new Diff(expected, actual);
assertTrue(message + ", " + diff.toString(), diff.similar());
}
Modified: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java (original)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java Wed Oct 19 23:26:53 2005
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.impl.ResourceSource;
import org.w3c.dom.Document;
@@ -57,8 +57,8 @@
public void testBuild() throws Exception {
Source confSource = new ResourceSource("resource://org/apache/cocoon/forms/datatype/convertor/EnumConvertorTestCase.conf.xml");
Document sample = parser.parse(confSource.getInputStream());
- Element convertorElement = (Element) sample.getElementsByTagNameNS(Constants.DEFINITION_NS, "convertor").item(0);
- String enumClassName = convertorElement.getElementsByTagNameNS(Constants.DEFINITION_NS, "enum").item(0).getFirstChild().getNodeValue();
+ Element convertorElement = (Element) sample.getElementsByTagNameNS(FormsConstants.DEFINITION_NS, "convertor").item(0);
+ String enumClassName = convertorElement.getElementsByTagNameNS(FormsConstants.DEFINITION_NS, "enum").item(0).getFirstChild().getNodeValue();
EnumConvertorBuilder builder = new EnumConvertorBuilder();
Convertor convertor = builder.build(convertorElement);
assertTrue("The returned convertor is not an EnumConvertor",
Modified: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/WidgetTestHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/WidgetTestHelper.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/WidgetTestHelper.java (original)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/WidgetTestHelper.java Wed Oct 19 23:26:53 2005
@@ -24,7 +24,7 @@
import junit.framework.Assert;
import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
import org.apache.cocoon.forms.FormManager;
import org.apache.cocoon.xml.AttributesImpl;
import org.apache.cocoon.xml.dom.DOMBuilder;
@@ -60,17 +60,17 @@
DOMBuilder domBuilder = new DOMBuilder();
// Start document and "fi:fragment" root element
domBuilder.startDocument();
- domBuilder.startPrefixMapping(Constants.INSTANCE_PREFIX, Constants.INSTANCE_NS);
+ domBuilder.startPrefixMapping(FormsConstants.INSTANCE_PREFIX, FormsConstants.INSTANCE_NS);
// FIXME: why simply declaring the prefix isn't enough?
AttributesImpl attr = new AttributesImpl();
- attr.addCDATAAttribute(NamespaceSupport.XMLNS, "fi:", "xmlns:fi", Constants.INSTANCE_NS);
- domBuilder.startElement(Constants.INSTANCE_NS, "fragment", Constants.INSTANCE_PREFIX_COLON + "fragment", attr);
+ attr.addCDATAAttribute(NamespaceSupport.XMLNS, "fi:", "xmlns:fi", FormsConstants.INSTANCE_NS);
+ domBuilder.startElement(FormsConstants.INSTANCE_NS, "fragment", FormsConstants.INSTANCE_PREFIX_COLON + "fragment", attr);
widget.generateSaxFragment(domBuilder, locale);
// End "fi:fragment" element and document
- domBuilder.endElement(Constants.INSTANCE_NS, "fragment", Constants.INSTANCE_PREFIX_COLON + "fragment");
- domBuilder.endPrefixMapping(Constants.INSTANCE_PREFIX);
+ domBuilder.endElement(FormsConstants.INSTANCE_NS, "fragment", FormsConstants.INSTANCE_PREFIX_COLON + "fragment");
+ domBuilder.endPrefixMapping(FormsConstants.INSTANCE_PREFIX);
domBuilder.endDocument();
// Return the document