/*
 * JBoss, Home of Professional Open Source
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.test.kernel.deployment.jboss.test;

import javax.naming.InitialContext;

import org.jboss.test.JBossTestCase;

/**
 * Deployment tests in isolated EAR.
 * 
 * @author <a href="adrian@jboss.org">Adrian Brock</a>
 * @version $Revision: 1.1.2.1 $
 */
public class DependsPOJOEARUnitTestCase extends JBossTestCase
{
   public DependsPOJOEARUnitTestCase(String test)
   {
      super(test);
   }
   
   public void testDependsPOJO() throws Exception
   {
      try
      {
         deploy("testkernel-dependspojo.ear");
         InitialContext ctx = new InitialContext();
         Object obj = ctx.lookup("test/kernel/deployment/pojodepends");
         assertNotNull(obj);
      }
      catch (Exception e)
      {
         getLog().info(e);
         throw e;
      }
      finally 
      {
         undeploy("testkernel-dependspojo.ear");
      }
   }
}
