From do-not-reply at jboss.org Fri Oct 1 08:31:43 2010 Content-Type: multipart/mixed; boundary="===============6439676414764919396==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: gatein-commits at lists.jboss.org Subject: [gatein-commits] gatein SVN: r4457 - in components/wsrp/trunk: consumer/src/main/java/org/gatein/wsrp/consumer/registry and 1 other directories. Date: Fri, 01 Oct 2010 08:31:43 -0400 Message-ID: <201010011231.o91CVhuU007332@svn01.web.mwc.hst.phx2.redhat.com> --===============6439676414764919396== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2010-10-01 08:31:42 -0400 (Fri, 01 Oct 2010) New Revision: 4457 Modified: components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/Cons= umerBeanTestCase.java components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/re= gistry/InMemoryConsumerRegistry.java components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protoc= ol/v2/BehaviorBackedServiceFactory.java Log: - GTNWSRP-83: Minor test improvements. Modified: components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/oth= er/ConsumerBeanTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/Con= sumerBeanTestCase.java 2010-10-01 09:50:50 UTC (rev 4456) +++ components/wsrp/trunk/admin-gui/src/test/java/org/gatein/wsrp/other/Con= sumerBeanTestCase.java 2010-10-01 12:31:42 UTC (rev 4457) @@ -30,15 +30,15 @@ import org.gatein.wsrp.admin.ui.ConsumerBean; import org.gatein.wsrp.consumer.registry.ConsumerRegistry; import org.gatein.wsrp.consumer.registry.InMemoryConsumerRegistry; +import org.gatein.wsrp.services.SOAPServiceFactory; import org.gatein.wsrp.test.protocol.v2.BehaviorBackedServiceFactory; import org.gatein.wsrp.test.support.MockEndpointConfigurationInfo; = +import javax.faces.model.DataModel; import java.util.Locale; import java.util.Map; = /** - * TODO: re-activate tests once test-support module is updated. - * * @author Chris Laprun * @version $Revision: 12612 $ * @since 2.6 @@ -66,7 +66,10 @@ public void testInitialState() { assertEquals(CONSUMER_ID, bean.getId()); + assertEquals(bean.getProducerInfo().getId(), bean.getId()); + assertEquals(WSDL, bean.getWsdl()); + assertEquals(SOAPServiceFactory.DEFAULT_TIMEOUT_MS, bean.getTimeout(= ).intValue()); = assertFalse(bean.isModified()); assertTrue(bean.isRefreshNeeded()); @@ -79,6 +82,12 @@ assertFalse(bean.isRegistrationLocallyModified()); assertFalse(bean.isRegistrationPropertiesExisting()); = + assertNull(bean.getCurrentExport()); + + DataModel existingExports =3D bean.getExistingExports(); + assertNotNull(existingExports); + assertEquals(0, existingExports.getRowCount()); + try { assertFalse(bean.isRegistrationRequired()); Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/cons= umer/registry/InMemoryConsumerRegistry.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/r= egistry/InMemoryConsumerRegistry.java 2010-10-01 09:50:50 UTC (rev 4456) +++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/r= egistry/InMemoryConsumerRegistry.java 2010-10-01 12:31:42 UTC (rev 4457) @@ -1,28 +1,30 @@ /* -* JBoss, a division of Red Hat -* Copyright 2008, 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. -*/ + * 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.consumer.registry; = import org.gatein.wsrp.consumer.ProducerInfo; +import org.gatein.wsrp.consumer.migration.InMemoryMigrationService; = import java.util.Iterator; import java.util.UUID; @@ -33,6 +35,11 @@ */ public class InMemoryConsumerRegistry extends AbstractConsumerRegistry { + public InMemoryConsumerRegistry() + { + setMigrationService(new InMemoryMigrationService()); + } + @Override protected void save(ProducerInfo info, String messageOnError) { Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test= /protocol/v2/BehaviorBackedServiceFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/proto= col/v2/BehaviorBackedServiceFactory.java 2010-10-01 09:50:50 UTC (rev 4456) +++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/proto= col/v2/BehaviorBackedServiceFactory.java 2010-10-01 12:31:42 UTC (rev 4457) @@ -67,7 +67,7 @@ private boolean initialized =3D false; private String wsdl =3D DEFAULT_WSDL_URL; public static final String DEFAULT_WSDL_URL =3D "http://example.com/pro= ducer?wsdl"; - private int timeout; + private int timeout =3D DEFAULT_TIMEOUT_MS; = = public BehaviorBackedServiceFactory() --===============6439676414764919396==--