Author: chris.laprun(a)jboss.com
Date: 2010-11-05 12:24:35 -0400 (Fri, 05 Nov 2010)
New Revision: 4958
Modified:
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java
Log:
- Added check to see if the last modified date is properly updated when needed.
Modified:
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java
===================================================================
---
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java 2010-11-05
16:06:17 UTC (rev 4957)
+++
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java 2010-11-05
16:24:35 UTC (rev 4958)
@@ -52,6 +52,8 @@
RegistrationPropertyDescription newFoo = new
RegistrationPropertyDescription("newFoo", WSRPConstants.XSD_STRING);
expected.put(newFoo.getName(), newFoo);
+ long lastModified = requirements.getLastModified();
+
requirements.addRegistrationPropertyChangeListener(new
RegistrationPropertyChangeListener()
{
public void propertiesHaveChanged(Map<QName, ? extends
PropertyDescription> newRegistrationProperties)
@@ -61,6 +63,8 @@
});
requirements.setRegistrationProperties(expected);
+
+ assertTrue(requirements.getLastModified() > lastModified);
}
public void testSetUnchangedRegistrationProperties()
@@ -72,6 +76,8 @@
RegistrationPropertyDescription newFoo = new
RegistrationPropertyDescription("foo", WSRPConstants.XSD_STRING);
expected.put(newFoo.getName(), newFoo);
+ long lastModified = requirements.getLastModified();
+
requirements.addRegistrationPropertyChangeListener(new
RegistrationPropertyChangeListener()
{
public void propertiesHaveChanged(Map<QName, ? extends
PropertyDescription> newRegistrationProperties)
@@ -81,6 +87,8 @@
});
requirements.setRegistrationProperties(expected);
+
+ assertEquals(lastModified, requirements.getLastModified());
}
public void testReloadSamePolicy()
Show replies by date