[jboss-cvs] JBossAS SVN: r81451 - trunk/testsuite/src/main/org/jboss/test/profileservice/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 21 13:12:04 EST 2008


Author: scott.stark at jboss.org
Date: 2008-11-21 13:12:04 -0500 (Fri, 21 Nov 2008)
New Revision: 81451

Modified:
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
JBAS-6204, add a test for the security-domain property type/value

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2008-11-21 17:56:39 UTC (rev 81450)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java	2008-11-21 18:12:04 UTC (rev 81451)
@@ -49,6 +49,8 @@
 import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
 import org.jboss.managed.api.annotation.ManagementProperty;
 import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.metatype.api.types.GenericMetaType;
+import org.jboss.metatype.api.types.MetaType;
 import org.jboss.metatype.api.types.SimpleMetaType;
 import org.jboss.metatype.api.values.GenericValue;
 import org.jboss.metatype.api.values.MapCompositeValueSupport;
@@ -480,6 +482,16 @@
       ManagedComponent hsqldb = mgtView.getComponent("DefaultDS", type);
       Map<String,ManagedProperty> props = hsqldb.getProperties();
       validatePropertyMetaValues(props);
+
+      // Validate more details on specific properties
+      ManagedProperty securityDomain = props.get("security-domain");
+      assertNotNull("security-domain", securityDomain);
+      MetaType securityDomainType = securityDomain.getMetaType();
+      assertTrue("security-domain type is a GenericMetaType", securityDomainType instanceof GenericMetaType);
+      log.debug("security-domain type: "+securityDomainType);
+      MetaValue securityDomainValue = securityDomain.getValue();
+      assertTrue("security-domain value is a GenericValue", securityDomainValue instanceof GenericValue);
+      log.debug("security-domain value: "+securityDomainValue);
    }
 
    /**




More information about the jboss-cvs-commits mailing list