[jboss-svn-commits] JBL Code SVN: r6762 - labs/jbossesb/workspace/jokum/product/core/listeners/tests/src/org/jboss/soa/esb/listeners

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Oct 12 16:14:22 EDT 2006


Author: jokum
Date: 2006-10-12 16:14:20 -0400 (Thu, 12 Oct 2006)
New Revision: 6762

Removed:
   labs/jbossesb/workspace/jokum/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/HttpListenerUnitTest.java
Log:
Refactored to QA

Deleted: labs/jbossesb/workspace/jokum/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/HttpListenerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/jokum/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/HttpListenerUnitTest.java	2006-10-12 20:11:02 UTC (rev 6761)
+++ labs/jbossesb/workspace/jokum/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/HttpListenerUnitTest.java	2006-10-12 20:14:20 UTC (rev 6762)
@@ -1,114 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.listeners;
-
-import java.io.IOException;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.log4j.Logger;
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.soa.esb.helpers.DomElement;
-import org.xml.sax.SAXException;
-
-/**
- * Test the HttpListener
- * 
- * @author <a href="mailto:johan.kumps at telenet.be">Johan Kumps</a>
- */
-public class HttpListenerUnitTest extends TestCase {
-
-	/** The Logger. */
-	protected Logger log = Logger.getLogger(getClass());
-
-	/**
-	 * Test basic construction.
-	 * 
-	 * @throws Exception
-	 */
-	 public void test_Empty_Construction() throws Exception {
-		log.info("Constructing instance of HttpListener");
-		// This should fail
-		@SuppressWarnings("unused")
-		HttpListener httpListener = null;
-		try {
-			httpListener = new HttpListener(null, null, null);
-			fail("HttpListener should fail with empty constructor string");
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	public void test_Construction() throws Exception {
-
-		DomElement domElement = DomElement.fromInputStream(getClass()
-				.getResourceAsStream("HttpListenerUnitTest.xml"));
-
-		log.info("Loaded - " + domElement.toXml());
-	}
-	
-	public void test_Invocation() throws Exception {
-		
-		Thread test = new Thread(){
-			public void run(){
-				DomElement domElement;
-				try {
-					domElement = domElement = DomElement.fromInputStream(getClass()
-								.getResourceAsStream("HttpListenerUnitTest.xml"));
-					GpListener gpListener = new GpListener(domElement);
-					gpListener.run();
-				} catch (SAXException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				} catch (IOException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				} catch (Exception e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-			}
-		};
-		test.start();
-
-		ComplexObject testObject = new ComplexObject(2, "foo", true);
-
-		String locatorURI = "http://localhost:5400";
-		InvokerLocator locator = new InvokerLocator(locatorURI);
-
-		Client remotingClient = new Client(locator);
-		remotingClient.connect();
-
-		Object response;
-		try {
-			response = remotingClient.invoke(testObject, null);
-			Assert.assertEquals(testObject, response);
-		} catch (Throwable e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-
-	}
-
-}




More information about the jboss-svn-commits mailing list