diff --git a/bindings/java/src/org/hyperic/sigar/win32/test/TestService.java b/bindings/java/src/org/hyperic/sigar/win32/test/TestService.java index 794c16df..0098467b 100644 --- a/bindings/java/src/org/hyperic/sigar/win32/test/TestService.java +++ b/bindings/java/src/org/hyperic/sigar/win32/test/TestService.java @@ -18,6 +18,10 @@ package org.hyperic.sigar.win32.test; +import java.util.List; + +import org.hyperic.sigar.Sigar; + import org.hyperic.sigar.test.SigarTestCase; import org.hyperic.sigar.win32.Service; @@ -55,6 +59,25 @@ public class TestService extends SigarTestCase { } } + public void testServiceNames() throws Exception { + List services = Service.getServiceNames(); + assertGtZeroTrace("getServiceNames", services.size()); + + final String[] ptql = { + "Service.Name.ct=Ev", + "Service.Path.ew=.exe", + }; + Sigar sigar = new Sigar(); + try { + for (int i=0; i