test Service.getServiceConfigs

This commit is contained in:
Doug MacEachern 2008-03-27 00:15:48 +00:00
parent f53c99c43e
commit dd350667ea
1 changed files with 10 additions and 8 deletions

View File

@ -67,17 +67,19 @@ public class TestService extends SigarTestCase {
"Service.Name.ct=Ev",
"Service.Path.ew=.exe",
};
Sigar sigar = new Sigar();
try {
for (int i=0; i<ptql.length; i++) {
services = Service.getServiceNames(sigar, ptql[i]);
assertGtZeroTrace(ptql[i], services.size());
}
} finally {
sigar.close();
for (int i=0; i<ptql.length; i++) {
services = Service.getServiceNames(getSigar(), ptql[i]);
assertGtZeroTrace(ptql[i], services.size());
}
}
public void testServiceConfig() throws Exception {
List configs =
Service.getServiceConfigs(getSigar(), "svchost.exe");
assertGtZeroTrace("getServiceConfigs", configs.size());
}
public void testServiceCreateDelete() throws Exception {
if (!TEST_CREATE) {
return;