[jboss-cvs] JBossAS SVN: r69756 - trunk/testsuite/src/main/org/jboss/test/profileservice/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Feb 9 16:06:22 EST 2008
Author: scott.stark at jboss.org
Date: 2008-02-09 16:06:22 -0500 (Sat, 09 Feb 2008)
New Revision: 69756
Modified:
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
Add validation of XADataSourceTemplate and LocalTxDataSourceTemplate
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2008-02-09 20:53:27 UTC (rev 69755)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2008-02-09 21:06:22 UTC (rev 69756)
@@ -347,6 +347,18 @@
}
/**
+ * Validate that the LocalTxDataSourceTemplate ManagedPropertys are values are of type MetaValue
+ * @throws Exception
+ */
+ public void testLocalTxDataSourceTemplatePropertiesAreMetaValues()
+ throws Exception
+ {
+ ManagementView mgtView = getManagementView();
+ DeploymentTemplateInfo dsInfo = mgtView.getTemplate("LocalTxDataSourceTemplate");
+ Map<String,ManagedProperty> props = dsInfo.getProperties();
+ validatePropertyMetaValues(props);
+ }
+ /**
* Validate that all ManagedPropertys are values are of type MetaValue
* @throws Exception
*/
@@ -357,21 +369,7 @@
ComponentType type = new ComponentType("DataSource", "LocalTx");
ManagedComponent hsqldb = mgtView.getComponent("DefaultDS", type);
Map<String,ManagedProperty> props = hsqldb.getProperties();
- HashMap<String, Object> invalidValues = new HashMap<String, Object>();
- HashMap<String, Object> nullValues = new HashMap<String, Object>();
- for(ManagedProperty prop : props.values())
- {
- Object value = prop.getValue();
- if((value instanceof MetaValue) == false)
- {
- if(value == null)
- nullValues.put(prop.getName(), value);
- else
- invalidValues.put(prop.getName(), value);
- }
- }
- log.info("Propertys with null values: "+nullValues);
- assertEquals("InvalidPropertys: "+invalidValues, 0, invalidValues.size());
+ validatePropertyMetaValues(props);
}
public void testDefaultDSStats()
@@ -451,6 +449,18 @@
}
/**
+ * Validate that the XADataSourceTemplate ManagedPropertys are values are of type MetaValue
+ * @throws Exception
+ */
+ public void testXADataSourceTemplateTemplatePropertiesAreMetaValues()
+ throws Exception
+ {
+ ManagementView mgtView = getManagementView();
+ DeploymentTemplateInfo dsInfo = mgtView.getTemplate("XADataSourceTemplate");
+ Map<String,ManagedProperty> props = dsInfo.getProperties();
+ validatePropertyMetaValues(props);
+ }
+ /**
* Test adding a new hsql DataSource deployment
* @throws Exception
*/
@@ -737,4 +747,22 @@
return metaValue;
}
+ protected void validatePropertyMetaValues(Map<String, ManagedProperty> props)
+ {
+ HashMap<String, Object> invalidValues = new HashMap<String, Object>();
+ HashMap<String, Object> nullValues = new HashMap<String, Object>();
+ for(ManagedProperty prop : props.values())
+ {
+ Object value = prop.getValue();
+ if((value instanceof MetaValue) == false)
+ {
+ if(value == null)
+ nullValues.put(prop.getName(), value);
+ else
+ invalidValues.put(prop.getName(), value);
+ }
+ }
+ log.info("Propertys with null values: "+nullValues);
+ assertEquals("InvalidPropertys: "+invalidValues, 0, invalidValues.size());
+ }
}
More information about the jboss-cvs-commits
mailing list