extend SigarTestCase

use getSigar method
This commit is contained in:
Doug MacEachern 2004-07-06 02:41:05 +00:00
parent 14f719659d
commit 3078f148b1
5 changed files with 10 additions and 20 deletions

View File

@ -1,18 +1,16 @@
package net.hyperic.sigar.test; package net.hyperic.sigar.test;
import junit.framework.TestCase;
import net.hyperic.sigar.Sigar; import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.ProcMem; import net.hyperic.sigar.ProcMem;
public class TestProcMem extends TestCase { public class TestProcMem extends SigarTestCase {
public TestProcMem(String name) { public TestProcMem(String name) {
super(name); super(name);
} }
public void testCreate() throws Exception { public void testCreate() throws Exception {
Sigar sigar = new Sigar(); Sigar sigar = getSigar();
ProcMem procMem = sigar.getProcMem(sigar.getPid()); ProcMem procMem = sigar.getProcMem(sigar.getPid());

View File

@ -1,18 +1,16 @@
package net.hyperic.sigar.test; package net.hyperic.sigar.test;
import junit.framework.TestCase;
import net.hyperic.sigar.Sigar; import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.ProcStat; import net.hyperic.sigar.ProcStat;
public class TestProcStat extends TestCase { public class TestProcStat extends SigarTestCase {
public TestProcStat(String name) { public TestProcStat(String name) {
super(name); super(name);
} }
public void testCreate() throws Exception { public void testCreate() throws Exception {
Sigar sigar = new Sigar(); Sigar sigar = getSigar();
ProcStat stat = sigar.getProcStat(); ProcStat stat = sigar.getProcStat();

View File

@ -1,18 +1,16 @@
package net.hyperic.sigar.test; package net.hyperic.sigar.test;
import junit.framework.TestCase;
import net.hyperic.sigar.Sigar; import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.ProcState; import net.hyperic.sigar.ProcState;
public class TestProcState extends TestCase { public class TestProcState extends SigarTestCase {
public TestProcState(String name) { public TestProcState(String name) {
super(name); super(name);
} }
public void testCreate() throws Exception { public void testCreate() throws Exception {
Sigar sigar = new Sigar(); Sigar sigar = getSigar();
ProcState procState = sigar.getProcState(sigar.getPid()); ProcState procState = sigar.getProcState(sigar.getPid());

View File

@ -1,18 +1,16 @@
package net.hyperic.sigar.test; package net.hyperic.sigar.test;
import junit.framework.TestCase;
import net.hyperic.sigar.Sigar; import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.Swap; import net.hyperic.sigar.Swap;
public class TestSwap extends TestCase { public class TestSwap extends SigarTestCase {
public TestSwap(String name) { public TestSwap(String name) {
super(name); super(name);
} }
public void testCreate() throws Exception { public void testCreate() throws Exception {
Sigar sigar = new Sigar(); Sigar sigar = getSigar();
Swap swap = sigar.getSwap(); Swap swap = sigar.getSwap();

View File

@ -1,18 +1,16 @@
package net.hyperic.sigar.test; package net.hyperic.sigar.test;
import junit.framework.TestCase;
import net.hyperic.sigar.Sigar; import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.Uptime; import net.hyperic.sigar.Uptime;
public class TestUptime extends TestCase { public class TestUptime extends SigarTestCase {
public TestUptime(String name) { public TestUptime(String name) {
super(name); super(name);
} }
public void testCreate() throws Exception { public void testCreate() throws Exception {
Sigar sigar = new Sigar(); Sigar sigar = getSigar();
Uptime uptime = sigar.getUptime(); Uptime uptime = sigar.getUptime();