Author: chris.laprun(a)jboss.com
Date: 2007-08-18 04:51:10 -0400 (Sat, 18 Aug 2007)
New Revision: 7986
Added:
trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal-registration.xml
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerConfigurationTestCase.java
trunk/wsrp/src/resources/portal-wsrp-sar/dtd/jboss-wsrp-producer_2_6.dtd
trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal.xml
Log:
JBPORTAL-1632: Changed constraints on Producer DTD, added test case.
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerConfigurationTestCase.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerConfigurationTestCase.java 2007-08-17
22:39:31 UTC (rev 7985)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerConfigurationTestCase.java 2007-08-18
08:51:10 UTC (rev 7986)
@@ -92,9 +92,9 @@
checkRegistrationProperty(requirements, 2);
}
- public void testMinimalUnmarshalling() throws Exception
+ public void testMinimalRegistrationUnmarshalling() throws Exception
{
- ProducerConfiguration producerConfiguration =
getProducerConfiguration("minimal.xml");
+ ProducerConfiguration producerConfiguration =
getProducerConfiguration("minimal-registration.xml");
ProducerRegistrationRequirements requirements =
producerConfiguration.getRegistrationRequirements();
assertNotNull(requirements);
assertTrue(requirements.requiresRegistration());
@@ -104,6 +104,13 @@
assertTrue(properties.isEmpty());
}
+ public void testMinimalUnmarshalling() throws Exception
+ {
+ ProducerConfiguration producerConfiguration =
getProducerConfiguration("minimal.xml");
+ ProducerRegistrationRequirements requirements =
producerConfiguration.getRegistrationRequirements();
+ assertNull(requirements);
+ }
+
public void testInvalidMultipleRegistrationConfiguration() throws Exception
{
try
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/dtd/jboss-wsrp-producer_2_6.dtd
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/dtd/jboss-wsrp-producer_2_6.dtd 2007-08-17
22:39:31 UTC (rev 7985)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/dtd/jboss-wsrp-producer_2_6.dtd 2007-08-18
08:51:10 UTC (rev 7986)
@@ -30,7 +30,7 @@
-->
<!-- Root element for the producer configuration. Contains a single
registration-configuration as of Portal 2.6 -->
-<!ELEMENT producer-configuration ( registration-configuration )>
+<!ELEMENT producer-configuration ( registration-configuration? )>
<!-- Allows configuration of whether the producer requires registration or not and how
to deal with registrations. -->
Added:
trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal-registration.xml
===================================================================
---
trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal-registration.xml
(rev 0)
+++
trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal-registration.xml 2007-08-18
08:51:10 UTC (rev 7986)
@@ -0,0 +1,27 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE producer-configuration PUBLIC "-//JBoss Portal//DTD WSRP Local Producer
Configuration 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-wsrp-producer_2_6.dtd">
+
+<producer-configuration><registration-configuration/></producer-configuration>
\ No newline at end of file
Modified: trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal.xml
===================================================================
---
trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal.xml 2007-08-17
22:39:31 UTC (rev 7985)
+++
trunk/wsrp/src/resources/tests/test-producer-configuration-lib-jar/minimal.xml 2007-08-18
08:51:10 UTC (rev 7986)
@@ -23,5 +23,5 @@
<!DOCTYPE producer-configuration PUBLIC "-//JBoss Portal//DTD WSRP Local Producer
Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-producer_2_6.dtd">
-<producer-configuration><registration-configuration/></producer-configuration>
+<producer-configuration/>