/*
 * JBoss, the OpenSource J2EE webOS
 * 
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.test.kernel.deployment.jboss.test;

import javax.naming.InitialContext;

import junit.framework.Test;

import org.jboss.test.JBossTestCase;
import org.jboss.test.kernel.deployment.jboss.beans.simplepojo.SimplePOJO;

/**
 * Kernel deployment tests.
 * 
 * @author <a href="adrian@jboss.com">Adrian Brock</a>
 * @version $Revision: 1.1.2.1 $
 */
public class SimplePOJOUnitTestCase extends JBossTestCase
{
   public void testSimplePOJO() throws Exception
   {
      InitialContext ctx = new InitialContext();
      SimplePOJO pojo = (SimplePOJO) ctx.lookup("test/kernel/deployment/simplepojo");
      assertEquals("()", pojo.getConstructorUsed());
      assertEquals("Something", pojo.getSomething());
      assertEquals(true, pojo.created);
      assertEquals(true, pojo.started);
   }
   
   public SimplePOJOUnitTestCase(String test)
   {
      super(test);
   }

   public static Test suite() throws Exception
   {
      return getDeploySetup(SimplePOJOUnitTestCase.class, "testkernel-simplepojo.beans");
   }
}
