Author: chris.laprun(a)jboss.com
Date: 2010-10-15 12:39:36 -0400 (Fri, 15 Oct 2010)
New Revision: 4688
Added:
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
Log:
- GTNWSRP-102: Fixed copy constructor.
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java
===================================================================
---
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-10-15
15:24:26 UTC (rev 4687)
+++
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/registration/RegistrationPropertyDescription.java 2010-10-15
16:39:36 UTC (rev 4688)
@@ -69,8 +69,8 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(other,
"RegistrationPropertyDescription");
- setName(new QName(other.name.toString()));
- setType(new QName(other.type.toString()));
+ setName(QName.valueOf(other.name.toString()));
+ setType(QName.valueOf(other.type.toString()));
if (other.aliases != null)
{
Added:
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java
===================================================================
---
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java
(rev 0)
+++
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/RegistrationPropertyDescriptionTestCase.java 2010-10-15
16:39:36 UTC (rev 4688)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, 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.
+ */
+
+package org.gatein.wsrp.producer.config;
+
+import junit.framework.TestCase;
+import org.gatein.wsrp.WSRPConstants;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class RegistrationPropertyDescriptionTestCase extends TestCase
+{
+ public void testEquals()
+ {
+ RegistrationPropertyDescription foo1 = new
RegistrationPropertyDescription("foo", WSRPConstants.XSD_STRING);
+ RegistrationPropertyDescription foo2 = new
RegistrationPropertyDescription("foo", WSRPConstants.XSD_STRING);
+
+ assertEquals(foo1, foo2);
+
+ assertEquals(foo1, new RegistrationPropertyDescription(foo1));
+ }
+}