From 5d440dcc14d2d3ff7d87bef09c8f4bcd5aea9970 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 26 Mar 2008 17:47:59 +0000 Subject: [PATCH] test getServiceNames --- .../hyperic/sigar/win32/test/TestService.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) 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