mgtView.applyTemplate(deploymentName, dsInfo);
// reload the view
activeView = null;
mgtView = getManagementView();
ManagedComponent dsMC = getManagedComponent(mgtView, componentType, componentName);
assertNotNull(dsMC);
Set<String> mcPropNames = new HashSet<String>(dsMC.getPropertyNames());
for(String propName : propValues.keySet())
{
ManagedProperty prop = dsMC.getProperty(propName);
log.debug("Checking: "+propName);
assertNotNull(propName, prop);
Object propValue = prop.getValue();
Object expectedValue = propValues.get(propName);
if(propValue instanceof MetaValue)
{
if (prop.getMetaType().isComposite())
{
// TODO / FIXME - compare composites
log.warn("Not checking composite: "+propValue);
}
else
{
// Compare the MetaValues
assertEquals(prop.getName(), expectedValue, propValue);
}
}
else if(propValue != null)
{
fail(prop.getName()+" is not a MetaValue: "+propValue);
}
mcPropNames.remove(propName);
}
if(!mcPropNames.isEmpty())
{
log.warn(getName() + "> untested properties: " + mcPropNames);
for(String propName : mcPropNames)
{
ManagedProperty prop = dsMC.getProperty(propName);
log.info(prop);
}
}
}