cactus-dev  

svn commit: r673632 - in /jakarta/cactus/trunk/samples/ejb: pom.xml src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java

ptahchiev
Thu, 03 Jul 2008 02:18:51 -0700

Author: ptahchiev
Date: Thu Jul  3 02:18:19 2008
New Revision: 673632

URL: http://svn.apache.org/viewvc?rev=673632&view=rev
Log:
Changed the container version and installerURL.

Added:
    
jakarta/cactus/trunk/samples/ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
   (with props)
Modified:
    jakarta/cactus/trunk/samples/ejb/pom.xml

Modified: jakarta/cactus/trunk/samples/ejb/pom.xml
URL: 
http://svn.apache.org/viewvc/jakarta/cactus/trunk/samples/ejb/pom.xml?rev=673632&r1=673631&r2=673632&view=diff
==============================================================================
--- jakarta/cactus/trunk/samples/ejb/pom.xml (original)
+++ jakarta/cactus/trunk/samples/ejb/pom.xml Thu Jul  3 02:18:19 2008
@@ -192,11 +192,11 @@
                                        <wait>false</wait>
                                        <timeout>20000</timeout>
                                        <container>
-                                               
<containerId>tomcat5x</containerId>
+                                               
<containerId>jboss42x</containerId>
                                                <log>target/cargo.log</log>
                                                
<output>target/output.log</output>
                                                <zipUrlInstaller>
-                                                       
<url>http://apache.speedbone.de/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip</url>
+                                                       
<url>http://heanet.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.2.GA.zip</url>
                                                        
<installDir>${basedir}/install</installDir>
                                                </zipUrlInstaller>
                                        </container>

Added: 
jakarta/cactus/trunk/samples/ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
URL: 
http://svn.apache.org/viewvc/jakarta/cactus/trunk/samples/ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java?rev=673632&view=auto
==============================================================================
--- 
jakarta/cactus/trunk/samples/ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
 (added)
+++ 
jakarta/cactus/trunk/samples/ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
 Thu Jul  3 02:18:19 2008
@@ -0,0 +1,63 @@
+/* 
+ * ========================================================================
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * ========================================================================
+ */
+package org.apache.cactus.sample.ejb;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import junit.framework.TestCase;
+
+import org.apache.cactus.ServletTestCase;
+
+/**
+ * Sample Cactus test for a session bean.
+ *
+ * @version $Id: TestConverterEJB.java 238816 2004-02-29 16:36:46Z vmassol $
+ */
+public class TestConverterEJB extends ServletTestCase
+{
+    /**
+     * Class under test
+     */
+    private Converter converter;
+
+    /**
+     * @see TestCase#setUp()
+     */ 
+    public void setUp() throws Exception
+    {
+        Context ctx = new InitialContext();
+        ConverterHome home = (ConverterHome) PortableRemoteObject.narrow(
+            ctx.lookup("Converter"), ConverterHome.class);
+        this.converter = home.create();
+    }
+
+    /**
+     * Verify yen to dollars conversion works.
+     * @throws Exception on error
+     */
+    public void testConvert() throws Exception
+    {
+        double dollar = this.converter.convertYenToDollar(100.0);
+        assertEquals("dollar", 1.0, dollar, 0.01);
+    }
+}

Propchange: 
jakarta/cactus/trunk/samples/ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • svn commit: r673632 - in /jakarta/cactus/trunk/samples/ejb: pom.xml src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java ptahchiev