possible for subkeys/values not to exist
This commit is contained in:
parent
29d57da8a9
commit
9b4dd7b263
|
@ -65,11 +65,14 @@ public class TestRegistryKey extends SigarTestCase {
|
||||||
} catch (Exception e) { /*not installed - ok*/ }
|
} catch (Exception e) { /*not installed - ok*/ }
|
||||||
if (msmq != null) {
|
if (msmq != null) {
|
||||||
traceln("MSMQ...");
|
traceln("MSMQ...");
|
||||||
assertTrue(msmq.getSubKeyNames().length > 0);
|
if (msmq.getSubKeyNames().length > 0) {
|
||||||
String build = msmq.getStringValue("CurrentBuild");
|
try {
|
||||||
assertLengthTrace("CurrentBuild", build);
|
String build = msmq.getStringValue("CurrentBuild");
|
||||||
int id = msmq.getIntValue("SeqID");
|
assertLengthTrace("CurrentBuild", build);
|
||||||
assertGtZeroTrace("SeqID", id);
|
int id = msmq.getIntValue("SeqID");
|
||||||
|
assertGtZeroTrace("SeqID", id);
|
||||||
|
} catch (Exception e) {}
|
||||||
|
}
|
||||||
msmq.close();
|
msmq.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,8 +82,10 @@ public class TestRegistryKey extends SigarTestCase {
|
||||||
} catch (Exception e) { /*not installed - ok*/ }
|
} catch (Exception e) { /*not installed - ok*/ }
|
||||||
if (sql != null) {
|
if (sql != null) {
|
||||||
traceln("MsSQL...");
|
traceln("MsSQL...");
|
||||||
String edition = sql.getStringValue("Edition");
|
try {
|
||||||
assertLengthTrace("Edition", edition);
|
String edition = sql.getStringValue("Edition");
|
||||||
|
assertLengthTrace("Edition", edition);
|
||||||
|
} catch (Exception e) {}
|
||||||
sql.close();
|
sql.close();
|
||||||
}
|
}
|
||||||
ms.close();
|
ms.close();
|
||||||
|
|
Loading…
Reference in New Issue