lcsim/test/org/lcsim/conditions
diff -N ConditionsReaderTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ConditionsReaderTest.java 23 May 2008 05:00:19 -0000 1.1
@@ -0,0 +1,27 @@
+package org.lcsim.conditions;
+
+import junit.framework.TestCase;
+import org.lcsim.conditions.ConditionsManager.ConditionsNotFoundException;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ *
+ * Test that conditions are accessible in test detectors.
+ *
+ * @author jeremym
+ */
+public class ConditionsReaderTest extends TestCase
+{
+ String detectors[] = {"SiTrackerTest01","D09","sid01"};
+
+ public final void testReadDetectors() throws ConditionsNotFoundException, IOException
+ {
+ for (String detector : detectors)
+ {
+ ConditionsReader reader = ConditionsReader.create(detector,0);
+ InputStream in = reader.open("detector","properties");
+ if (in == null) throw new RuntimeException("The detector.properties file was not found for " + detector + "!");
+ }
+ }
+}