[jbossws-commits] JBossWS SVN: r6300 - in framework/trunk/src/test/java/org/jboss/test/ws: console and 1 other directory.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Apr 9 07:32:22 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-04-09 07:32:22 -0400 (Wed, 09 Apr 2008)
New Revision: 6300

Added:
   framework/trunk/src/test/java/org/jboss/test/ws/console/
   framework/trunk/src/test/java/org/jboss/test/ws/console/ConsoleAccessTestCase.java
Log:
Move console test to framework

Added: framework/trunk/src/test/java/org/jboss/test/ws/console/ConsoleAccessTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/console/ConsoleAccessTestCase.java	                        (rev 0)
+++ framework/trunk/src/test/java/org/jboss/test/ws/console/ConsoleAccessTestCase.java	2008-04-09 11:32:22 UTC (rev 6300)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.console;
+
+// $Id$
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Ensure JBossWS console is accessible
+ *
+ * @author richard.opalka at jboss.com
+ */
+public final class ConsoleAccessTestCase extends JBossWSTest
+{
+   public void testAccess() throws Exception
+   {
+      String url = "http://" + this.getServerHost() + ":8080/jbossws";
+      HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();
+      int responseCode = connection.getResponseCode();
+      if (responseCode != HttpURLConnection.HTTP_OK)
+      {
+         fail("Cannot access JBossWS console, responseCode == " + responseCode);
+      }
+   }
+}


Property changes on: framework/trunk/src/test/java/org/jboss/test/ws/console/ConsoleAccessTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list