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