Author: chris.laprun(a)jboss.com
Date: 2009-11-23 09:32:21 -0500 (Mon, 23 Nov 2009)
New Revision: 762
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java
Log:
- Added test cases and checks.
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2009-11-23
14:01:38 UTC (rev 761)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2009-11-23
14:32:21 UTC (rev 762)
@@ -218,8 +218,9 @@
return persistentEndpointInfo;
}
- void setEndpointConfigurationInfo(EndpointConfigurationInfo
endpointConfigurationInfo)
+ public void setEndpointConfigurationInfo(EndpointConfigurationInfo
endpointConfigurationInfo)
{
+ ParameterValidation.throwIllegalArgExceptionIfNull(endpointConfigurationInfo,
"EndpointConfigurationInfo");
this.persistentEndpointInfo = endpointConfigurationInfo;
}
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java 2009-11-23
14:01:38 UTC (rev 761)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java 2009-11-23
14:32:21 UTC (rev 762)
@@ -104,6 +104,25 @@
}
}
+ public void testSetEndpointConfigurationInfo()
+ {
+ EndpointConfigurationInfo endInfo = new EndpointConfigurationInfo();
+ info.setEndpointConfigurationInfo(endInfo);
+ assertEquals(endInfo, info.getEndpointConfigurationInfo());
+ }
+
+ public void testSetNullEndpointConfigurationInfo()
+ {
+ try
+ {
+ info.setEndpointConfigurationInfo(null);
+ fail("Shouldn't be possible to set a null
EndpointConfigurationInfo");
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+ }
+
public void testRefreshAndCache() throws Exception
{
ServiceDescriptionBehavior behavior = new ServiceDescriptionBehavior();
Show replies by date