From 734d2cebfc0894aa2daa9ee836239aa679145219 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 26 Jul 2007 07:27:17 +0000 Subject: [PATCH] add nfs stat tests --- .../hyperic/sigar/test/SigarTestRunner.java | 4 ++ .../hyperic/sigar/test/TestNfsClientV2.java | 43 +++++++++++++++++++ .../hyperic/sigar/test/TestNfsClientV3.java | 43 +++++++++++++++++++ .../hyperic/sigar/test/TestNfsServerV2.java | 43 +++++++++++++++++++ .../hyperic/sigar/test/TestNfsServerV3.java | 43 +++++++++++++++++++ 5 files changed, 176 insertions(+) create mode 100644 bindings/java/src/org/hyperic/sigar/test/TestNfsClientV2.java create mode 100644 bindings/java/src/org/hyperic/sigar/test/TestNfsClientV3.java create mode 100644 bindings/java/src/org/hyperic/sigar/test/TestNfsServerV2.java create mode 100644 bindings/java/src/org/hyperic/sigar/test/TestNfsServerV3.java diff --git a/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java b/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java index 7fb4559f..59a9d3cc 100644 --- a/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java +++ b/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java @@ -57,6 +57,10 @@ public class SigarTestRunner extends SigarCommandBase { TestNetStat.class, TestNetStatPort.class, TestTcpStat.class, + TestNfsClientV2.class, + TestNfsServerV2.class, + TestNfsClientV3.class, + TestNfsServerV3.class, TestProcArgs.class, TestProcEnv.class, TestProcExe.class, diff --git a/bindings/java/src/org/hyperic/sigar/test/TestNfsClientV2.java b/bindings/java/src/org/hyperic/sigar/test/TestNfsClientV2.java new file mode 100644 index 00000000..af1cb351 --- /dev/null +++ b/bindings/java/src/org/hyperic/sigar/test/TestNfsClientV2.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + * This file is part of SIGAR. + * + * SIGAR is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + */ + +package org.hyperic.sigar.test; + +import org.hyperic.sigar.Sigar; +import org.hyperic.sigar.SigarException; +import org.hyperic.sigar.NfsClientV2; + +public class TestNfsClientV2 extends SigarTestCase { + + public TestNfsClientV2(String name) { + super(name); + } + + public void testCreate() throws Exception { + Sigar sigar = getSigar(); + NfsClientV2 nfs; + + try { + nfs = sigar.getNfsClientV2(); + } catch (SigarException e) { + return; + } + + traceMethods(nfs); + } +} diff --git a/bindings/java/src/org/hyperic/sigar/test/TestNfsClientV3.java b/bindings/java/src/org/hyperic/sigar/test/TestNfsClientV3.java new file mode 100644 index 00000000..356a357f --- /dev/null +++ b/bindings/java/src/org/hyperic/sigar/test/TestNfsClientV3.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + * This file is part of SIGAR. + * + * SIGAR is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + */ + +package org.hyperic.sigar.test; + +import org.hyperic.sigar.Sigar; +import org.hyperic.sigar.SigarException; +import org.hyperic.sigar.NfsClientV3; + +public class TestNfsClientV3 extends SigarTestCase { + + public TestNfsClientV3(String name) { + super(name); + } + + public void testCreate() throws Exception { + Sigar sigar = getSigar(); + NfsClientV3 nfs; + + try { + nfs = sigar.getNfsClientV3(); + } catch (SigarException e) { + return; + } + + traceMethods(nfs); + } +} diff --git a/bindings/java/src/org/hyperic/sigar/test/TestNfsServerV2.java b/bindings/java/src/org/hyperic/sigar/test/TestNfsServerV2.java new file mode 100644 index 00000000..e404503a --- /dev/null +++ b/bindings/java/src/org/hyperic/sigar/test/TestNfsServerV2.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + * This file is part of SIGAR. + * + * SIGAR is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + */ + +package org.hyperic.sigar.test; + +import org.hyperic.sigar.Sigar; +import org.hyperic.sigar.SigarException; +import org.hyperic.sigar.NfsServerV2; + +public class TestNfsServerV2 extends SigarTestCase { + + public TestNfsServerV2(String name) { + super(name); + } + + public void testCreate() throws Exception { + Sigar sigar = getSigar(); + NfsServerV2 nfs; + + try { + nfs = sigar.getNfsServerV2(); + } catch (SigarException e) { + return; + } + + traceMethods(nfs); + } +} diff --git a/bindings/java/src/org/hyperic/sigar/test/TestNfsServerV3.java b/bindings/java/src/org/hyperic/sigar/test/TestNfsServerV3.java new file mode 100644 index 00000000..5b140511 --- /dev/null +++ b/bindings/java/src/org/hyperic/sigar/test/TestNfsServerV3.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + * This file is part of SIGAR. + * + * SIGAR is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + */ + +package org.hyperic.sigar.test; + +import org.hyperic.sigar.Sigar; +import org.hyperic.sigar.SigarException; +import org.hyperic.sigar.NfsServerV3; + +public class TestNfsServerV3 extends SigarTestCase { + + public TestNfsServerV3(String name) { + super(name); + } + + public void testCreate() throws Exception { + Sigar sigar = getSigar(); + NfsServerV3 nfs; + + try { + nfs = sigar.getNfsServerV3(); + } catch (SigarException e) { + return; + } + + traceMethods(nfs); + } +}