diff --git a/bindings/java/src/net/hyperic/sigar/test/SigarTestRunner.java b/bindings/java/src/net/hyperic/sigar/test/SigarTestRunner.java index 1ec547f9..4674b612 100644 --- a/bindings/java/src/net/hyperic/sigar/test/SigarTestRunner.java +++ b/bindings/java/src/net/hyperic/sigar/test/SigarTestRunner.java @@ -33,6 +33,8 @@ public class SigarTestRunner extends SigarCommandBase { TestLoadAverage.class, TestMem.class, TestNetIf.class, + TestNetInfo.class, + TestNetRoute.class, TestNetStat.class, TestProcArgs.class, TestProcEnv.class, @@ -44,9 +46,11 @@ public class SigarTestRunner extends SigarCommandBase { TestProcState.class, TestProcStat.class, TestProcTime.class, + TestResourceLimit.class, TestSwap.class, TestThreadCpu.class, TestUptime.class, + TestWho.class, }; private static final Class[] WIN32_TESTS = { diff --git a/bindings/java/src/net/hyperic/sigar/test/TestNetInfo.java b/bindings/java/src/net/hyperic/sigar/test/TestNetInfo.java new file mode 100644 index 00000000..8f660fd6 --- /dev/null +++ b/bindings/java/src/net/hyperic/sigar/test/TestNetInfo.java @@ -0,0 +1,15 @@ +package net.hyperic.sigar.test; + +import net.hyperic.sigar.NetInfo; +import net.hyperic.sigar.SigarException; + +public class TestNetInfo extends SigarTestCase { + + public TestNetInfo(String name) { + super(name); + } + + public void testNetInfo() throws SigarException { + NetInfo info = getSigar().getNetInfo(); + } +} diff --git a/bindings/java/src/net/hyperic/sigar/test/TestNetRoute.java b/bindings/java/src/net/hyperic/sigar/test/TestNetRoute.java new file mode 100644 index 00000000..340396a0 --- /dev/null +++ b/bindings/java/src/net/hyperic/sigar/test/TestNetRoute.java @@ -0,0 +1,25 @@ +package net.hyperic.sigar.test; + +import net.hyperic.sigar.NetRoute; +import net.hyperic.sigar.SigarException; +import net.hyperic.sigar.SigarNotImplementedException; + +public class TestNetRoute extends SigarTestCase { + + public TestNetRoute(String name) { + super(name); + } + + public void testNetRoute() throws SigarException { + NetRoute[] routes; + try { + routes = getSigar().getNetRouteList(); + } catch (SigarNotImplementedException e) { + return; + } + assertTrue(routes.length > 0); + for (int i=0; i 0); + } +}