[jboss-cvs] JBossAS SVN: r60093 - trunk/testsuite/src/main/org/jboss/test/profileservice/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 29 00:00:19 EST 2007
Author: scott.stark at jboss.org
Date: 2007-01-29 00:00:18 -0500 (Mon, 29 Jan 2007)
New Revision: 60093
Modified:
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
Update the testListComponent test
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2007-01-29 04:35:25 UTC (rev 60092)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2007-01-29 05:00:18 UTC (rev 60093)
@@ -112,24 +112,27 @@
* test api usage only
* @throws Exception
*/
- public void testListComponents () throws Exception
+ public void testListComponents() throws Exception
{
ManagementView mgtView = getManagementView();
// maybe needs a ctor which takes type,subtype ?
- ComponentType type = new ComponentType();
- type.setType("DataSource");
- type.setType("LocalTX");
+ ComponentType type = new ComponentType("DataSource", "LocalTx");
Set<ManagedComponent> comps = mgtView.getComponentsForType(type);
-
- if (comps != null)
+ log.info("testListComponents, DataSources: "+comps);
+ assertNotNull(comps);
+ ManagedComponent testAddDataSource = null;
+ for (ManagedComponent comp : comps)
{
- for (ManagedComponent comp : comps)
- {
- String name = comp.getName();
- Map<String,ManagedProperty> props = comp.getProperties();
- }
+ String name = comp.getName();
+ if( name.equals("testAddDataSource-dsf.xml") )
+ {
+ testAddDataSource = comp;
+ }
}
+ assertNotNull("testAddDataSource", testAddDataSource);
+ Map<String,ManagedProperty> props = testAddDataSource.getProperties();
+ log.info("testAddDataSource.props: "+props);
}
/**
@@ -194,9 +197,12 @@
throws Exception
{
ManagementView mgtView = getManagementView();
- ManagedDeployment ds = mgtView.getDeployment("testAddDataSource-dsf.xml", null);
- log.info("ManagedDeployment: "+ds);
-
+ ComponentType dsType = new ComponentType("DataSource", "LocalTx");
+ Set<ManagedComponent> dsComps = mgtView.getComponentsForType(dsType);
+ ManagedComponent dsComp = null;
+ Map<String, ManagedProperty> dsProps = dsComp.getProperties();
+ //dsComp.applyChanges();
+ mgtView.process();
}
public void testRemoveDataSource()
More information about the jboss-cvs-commits
mailing list