Author: ptahchiev Date: Wed Oct 1 12:13:52 2008 New Revision: 700875 URL: http://svn.apache.org/viewvc?rev=700875&view=rev Log: Moved the test to src/test/java
Added: jakarta/cactus/trunk/samples/ejb/src/test/ jakarta/cactus/trunk/samples/ejb/src/test/java/ jakarta/cactus/trunk/samples/ejb/src/test/java/org/ jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/ jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/sample/ jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/sample/ejb/ jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/sample/ejb/TestConverterEJB.java (with props) Removed: jakarta/cactus/trunk/samples/ejb/src/main/java/org/apache/cactus/sample/ejb/TestConverterEJB.java Added: jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/sample/ejb/TestConverterEJB.java URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/sample/ejb/TestConverterEJB.java?rev=700875&view=auto ============================================================================== --- jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/sample/ejb/TestConverterEJB.java (added) +++ jakarta/cactus/trunk/samples/ejb/src/test/java/org/apache/sample/ejb/TestConverterEJB.java Wed Oct 1 12:13:52 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/test/java/org/apache/sample/ejb/TestConverterEJB.java ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]