Author: mladen.turk(a)jboss.com
Date: 2007-10-29 08:57:29 -0400 (Mon, 29 Oct 2007)
New Revision: 1154
Added:
trunk/sight/test/org/jboss/sight/ModuleTest.java
Log:
Add Module test case
Added: trunk/sight/test/org/jboss/sight/ModuleTest.java
===================================================================
--- trunk/sight/test/org/jboss/sight/ModuleTest.java (rev 0)
+++ trunk/sight/test/org/jboss/sight/ModuleTest.java 2007-10-29 12:57:29 UTC (rev 1154)
@@ -0,0 +1,67 @@
+/*
+ * SIGHT - System information gathering hybrid tool
+ *
+ * Copyright(c) 2007 Red Hat Middleware, LLC,
+ * and individual contributors as indicated by the @authors tag.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library in the file COPYING.LIB;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ */
+package org.jboss.sight;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+/**
+ * Module Test.
+ *
+ */
+public class ModuleTest extends TestCase
+{
+
+ public static void main(String[] args)
+ {
+ junit.textui.TestRunner.run(ModuleTest.class);
+ }
+
+ protected void setUp()
+ throws Exception
+ {
+ Library.initialize("");
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+ Library.shutdown();
+ }
+
+ public void testModule()
+ throws Exception
+ {
+ boolean jvm = false;
+ Process proc = Process.self();
+ for (Module mod : proc.getModules()) {
+ if (mod.Name.indexOf("jvm") >= 0) {
+ jvm = true;
+ }
+ }
+ assertTrue(jvm);
+ }
+
+}
Property changes on: trunk/sight/test/org/jboss/sight/ModuleTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Show replies by date