/*
 *
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package org.jboss.ejb3.test.secondary.unit;

//import java.rmi.*;


import junit.framework.Test;
import org.jboss.ejb3.test.secondary.Customer;
import org.jboss.ejb3.test.secondary.EntityTest;
import org.jboss.test.JBossTestCase;

/**
 * Sample client for the jboss container.
 *
 * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
 * @version $Id: EntityUnitTestCase.java,v 1.1.6.4 2005/09/14 22:19:14 bill Exp $
 */

public class EntityUnitTestCase
extends JBossTestCase
{
   org.apache.log4j.Category log = getLog();

   static boolean deployed = false;
   static int test = 0;

   public EntityUnitTestCase(String name)
   {

      super(name);

   }

   public void testAll() throws Exception
   {
      EntityTest tester = (EntityTest) getInitialContext().lookup(EntityTest.class.getName());
      Customer c = tester.createCustomer();
      c = tester.findByCustomerId(c.getId());

      assertEquals(c.getName(), "Bill");
      assertEquals(c.getState(), "MA");
   }

   public static Test suite() throws Exception
   {
      return getDeploySetup(EntityUnitTestCase.class, "secondary-test.ejb3");
   }

}
