Examples of AnnotationTester


Examples of org.jboss.test.kernel.annotations.support.AnnotationTester

      return suite(FactoryMethodTestCase.class);
   }

   public void testFactoryMethod() throws Throwable
   {
      AnnotationTester tester = getTester();
      assertEquals("FromAnnotations", tester.getValue());
   }
View Full Code Here

Examples of org.jboss.test.kernel.annotations.support.AnnotationTester

      beanMetaData.setDestroy(new AbstractLifecycleMetaData("fromXMLDestroy"));
   }

   public void testLifecycleOverride() throws Throwable
   {
      AnnotationTester tester = getTester();
      Object[] values = (Object[])tester.getValue();
      assertEquals(new Object[]{FROM_XML, FROM_XML, null, null}, values);

      doUndeploy();

      values = (Object[])tester.getValue();
      assertEquals(new Object[]{null, null, FROM_XML, FROM_XML}, values);
   }
View Full Code Here

Examples of org.jboss.test.kernel.annotations.support.AnnotationTester

      beanMetaData.setUninstallCallbacks(uninstalls);
   }

   public void testCallbackOverride() throws Throwable
   {
      AnnotationTester tester = getTester();
      Object val = tester.getValue();
      assertInstanceOf(val, Integer.class);
      Integer count = (Integer)val;
      assertNotNull(count);
      assertEquals(1, count.intValue());

      doUndeploy();

      val = tester.getValue();
      assertInstanceOf(val, Integer.class);
      count = (Integer)val;
      assertNotNull(count);
      assertEquals(0, count.intValue());
   }
View Full Code Here

Examples of org.jboss.test.kernel.annotations.support.AnnotationTester

   }

   // simple check
   protected void checkOverride() throws Throwable
   {
      AnnotationTester tester = getTester();
      assertOverride(tester.getValue());
   }
View Full Code Here

Examples of org.jboss.test.kernel.annotations.support.AnnotationTester

      beanMetaData.setUninstalls(uninstalls);
   }

   public void testCallbackOverride() throws Throwable
   {
      AnnotationTester tester = getTester();
      Object val = tester.getValue();
      assertInstanceOf(val, Integer.class);
      Integer count = (Integer)val;
      assertNotNull(count);
      assertEquals(1, count.intValue());

      doUndeploy();

      val = tester.getValue();
      assertInstanceOf(val, Integer.class);
      count = (Integer)val;
      assertNotNull(count);
      assertEquals(0, count.intValue());
   }
View Full Code Here

Examples of org.jboss.test.kernel.annotations.support.AnnotationTester

   public void testExternalOverride() throws Throwable
   {
      getTester(getTesterName(), ControllerState.START);

      AnnotationTester holder = getHolder();

      Object val = holder.getValue();
      assertInstanceOf(val, Integer.class);
      Integer count = (Integer)val;
      assertNotNull(count);
      assertEquals(1, count.intValue());

      doUndeploy();

      val = holder.getValue();
      assertInstanceOf(val, Integer.class);
      count = (Integer)val;
      assertNotNull(count);
      assertEquals(0, count.intValue());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.