package com.oreilly.javaxp.xdoclet.ejbdoclet.client;
import junit.framework.TestCase;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import com.oreilly.javaxp.xdoclet.ejbdoclet.interfaces.*;
/**
* @author Brian M. Coyner
* $version $Id: TestPaymentProcessingBean.java,v 1.2 2002/09/08 01:42:58 jepc Exp $
*/
public class TestPaymentProcessingBean extends TestCase {
public TestPaymentProcessingBean(String name) {
super(name);
}
public void testPaymentProcessingBean() throws Exception {
InitialContext context = new InitialContext();
Object obj = context.lookup(PaymentProcessingBeanHome.JNDI_NAME);
PaymentProcessingBeanHome home = (PaymentProcessingBeanHome)
PortableRemoteObject.narrow(obj, PaymentProcessingBeanHome.class);
PaymentProcessingBean bean = home.create();
assertTrue("PaymentProcessingBean.makePayment() returned false.",
bean.makePayment("12345", 1000.00));
}
}
|