lcsim/test/org/lcsim/conditions
diff -u -r1.2 -r1.3
--- ConditionsManagerTest.java 6 Jul 2005 04:38:24 -0000 1.2
+++ ConditionsManagerTest.java 6 Jul 2005 05:14:02 -0000 1.3
@@ -38,6 +38,43 @@
{
ConditionsSet cs = _mgr.getConditions(s);
assertTrue(cs instanceof ConditionsSet);
+ if ( cs == null )
+ {
+ throw new RuntimeException("ConditionSet not found: " + s);
+ }
+ else
+ {
+ System.out.println("Found ConditionSet: " + s);
+
+ System.out.println("key=val pairs");
+
+ for ( Object o : cs.keySet() )
+ {
+ String k = o.toString();
+ System.out.println(k + "=" + cs.getString(k) );
+
+ Class typ = cs.getType(k);
+ try
+ {
+ if ( typ == double.class )
+ {
+ double dblVal = cs.getDouble(k);
+ }
+ if ( typ == int.class )
+ {
+ int intVal = cs.getInt(k);
+ }
+ else if ( typ == java.lang.String.class )
+ {
+ String strVal = cs.getString(k);
+ }
+ }
+ catch (IllegalArgumentException iae)
+ {
+ throw new RuntimeException("Bad key to ConditionsSet.getX() function.", iae);
+ }
+ }
+ }
}
}
}