Author: trader
Date: 2010-03-31 14:20:27 -0700 (Wed, 31 Mar 2010)
New Revision: 14456
URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14456
Modified:
trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java
Log:
Add test case specific to HHQ-3852
Modified: trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java
===================================================================
--- trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java 2010-03-31 21:15:12 UTC (rev 14455)
+++ trunk/unittest/src/org/hyperic/hq/product/ServerDetector_test.java 2010-03-31 21:20:27 UTC (rev 14456)
@@ -164,6 +164,22 @@
assertTrue(tsd.isInstallTypeVersion(installPath));
}
+ public void testNullVersionFile() throws Exception {
+ assertNotNull(tmpDir);
+ assertNotNull(simpleFile);
+
+ // substring match
+ Properties props = new Properties();
+ String installPath = simpleFile.getParent();
+ TestServerDetector tsd;
+
+ props.setProperty(TestServerDetector.getInstallPathNoMatch(), installPath);
+ tsd = new TestServerDetector(props);
+
+ // Should fail, no version file
+ assertFalse(tsd.isInstallTypeVersion(installPath));
+ }
+
private static class TestServerDetector extends ServerDetector {
private Properties props;
|