Examples of Simple


Examples of org.jboss.test.managed.factory.support.Simple

      TestSimpleICF icf = new TestSimpleICF();
      mof.setInstanceClassFactory(Simple.class, icf);
      testMOF = mof;

      BigDecimal bigDecimal = new BigDecimal(10);
      Simple simple = new Simple();
      simple.setBigDecimalValue(bigDecimal);

      ManagedObject managedObject = initManagedObject(simple);
      checkManagedObjectDefaults(Simple.class, managedObject);
      checkDefaultManagedProperties(managedObject, Simple.class);
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

   private static final int iterations = 1000;
  
   public void testSimple() throws Exception
   {
      SimpleBean bean = new SimpleBean();
      Simple simple = (Simple) assertCreateProxy(bean, Simple.class);
      SimpleInterceptor.invoked = null;
      simple.doSomething();
      assertTrue(bean.invoked);
      Method invoked = SimpleInterceptor.invoked;
      assertNotNull(invoked);
      assertEquals("doSomething", invoked.getName());
   }
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

      ClassLoader cl = Simple.class.getClassLoader();
      for (int i = 0; i < iterations; ++i)
      {
         SimpleBean bean = new SimpleBean();
         InvocationHandler ih = new MyInvocationHandler(bean);
         Simple simple = (Simple) Proxy.newProxyInstance(cl, interfaces, ih);
         simple.doSomething();
      }
   }
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

   public void testStressProxyFactory() throws Exception
   {
      for (int i = 0; i < iterations; ++i)
      {
         SimpleBean bean = new SimpleBean();
         Simple simple = (Simple) createProxy(bean);
         simple.doSomething();
      }
   }
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

public class InstanceAdvisedTestCase extends AbstractProxyTest
{
   public void testInstanceAdvised() throws Exception
   {
      SimpleBean bean1 = new SimpleBean();
      Simple simple1 = (Simple) assertCreateProxy(bean1, Simple.class);
      SimpleBean bean2 = new SimpleBean();
      Simple simple2 = (Simple) assertCreateProxy(bean2, Simple.class);
      InstanceInterceptor.last = null;
      simple1.doSomething();
      assertTrue(bean1.invoked);
      Object instance1 = InstanceInterceptor.last;
      assertNotNull(instance1);
      InstanceInterceptor.last = null;
      simple2.doSomething();
      assertTrue(bean2.invoked);
      Object instance2 = InstanceInterceptor.last;
      assertNotNull(instance2);
      assertFalse(instance1 == instance2);
   }
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

*/
public class HollowTestCase extends AbstractProxyTest
{
   public void testHollow() throws Exception
   {
      Simple simple = (Simple) assertCreateHollowProxy(new Class[] { Simple.class }, null, Simple.class);
      ReturningInterceptor.invoked = null;
      simple.doSomething();

      Method method = ReturningInterceptor.invoked;
      assertNotNull(method);
      assertEquals("doSomething", method.getName());
   }
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

            new Class[] {Other.class, Tagging.class},
            mixins,
            null,
            new Class[] {Other.class, Simple.class, Tagging.class, Another.class});

      Simple simple = (Simple)proxy;
      simple.doSomething();
      assertTrue(SimpleMixin.invoked);
      assertNotNull(SimpleInterceptor.invoked);
      assertEquals("doSomething", SimpleInterceptor.invoked.getName());
      assertNull(ReturningInterceptor.invoked);
      assertFalse(AnotherMixin.invoked);
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

*/
public class ObjectTestCase extends AbstractProxyTest
{
   public void testObject() throws Exception
   {
      Simple simple = (Simple) assertCreateProxy(new Object(), new Class[] { Simple.class }, Simple.class);
      simple.toString();
      ReturningInterceptor.invoked = null;
      simple.doSomething();
      Method method = ReturningInterceptor.invoked;
      assertNotNull(method);
      assertEquals("doSomething", method.getName());
   }
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

public class FieldTestCase extends AbstractProxyTest
{
   public void testField() throws Exception
   {
      SimpleBean bean = new SimpleBean();
      Simple simple = (Simple) assertCreateProxy(bean, Simple.class);
      SimpleInterceptor.invoked = null;
      simple.doSomething();
      assertTrue(bean.invoked);
      Method invoked = SimpleInterceptor.invoked;
      assertNotNull(invoked);
      assertEquals("doSomething", invoked.getName());
     
View Full Code Here

Examples of org.jboss.test.proxyfactory.support.Simple

      PlainBean bean = new PlainBean();
      AOPProxyFactoryMixin[] mixins = {new AOPProxyFactoryMixin(SimpleMixin.class, new Class[]{Simple.class})};
      Object proxy = assertCreateProxy(bean, mixins, Simple.class);

      Simple simple = (Simple)proxy;
      simple.doSomething();
      assertTrue(SimpleMixin.invoked);
      assertNotNull(SimpleInterceptor.invoked);
      assertEquals("doSomething", SimpleInterceptor.invoked.getName());
   }
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.