Package org.jboss.test.proxyfactory.support

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


   public void testSimpleMixinDefaultConstructor() throws Exception
   {
      SimpleMixin.invoked = false;
      SimpleInterceptor.invoked = null;

      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();
View Full Code Here


   {
      SimpleMixinWithConstructorAndDelegate.invoked = false;
      SimpleMixinWithConstructorAndDelegate.proxy = null;
      SimpleMixinWithConstructorAndDelegate.delegate = null;

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

      Simple simple = (Simple)proxy;
      simple.doSomething();
View Full Code Here

      assertNotNull(SimpleMixinWithConstructorAndDelegate.delegate);
      assertTrue(SimpleMixinWithConstructorAndDelegate.delegate.getClass().equals(Object.class));
      assertNotNull(SimpleInterceptor.invoked);
      assertEquals("doSomething", SimpleInterceptor.invoked.getName());
     
      PlainBean bean = new PlainBean();
      ((Delegate)proxy).setDelegate(bean);
      assertNotNull(SimpleMixinWithConstructorAndDelegate.delegate);
      assertEquals(bean, SimpleMixinWithConstructorAndDelegate.delegate);
   }
View Full Code Here

{
   public void testSimpleMixinDefaultConstructor() throws Exception
   {
      SimpleMixin.invoked = false;

      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();
View Full Code Here

   {
      SimpleMixinWithConstructorAndDelegate.invoked = false;
      SimpleMixinWithConstructorAndDelegate.proxy = null;
      SimpleMixinWithConstructorAndDelegate.delegate = null;

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

      Simple simple = (Simple)proxy;
      simple.doSomething();
View Full Code Here

      SimpleMixin.invoked = false;
      SimpleInterceptor.invoked = null;
      ReturningInterceptor.invoked = null;
      AnotherMixin.invoked = false;

      PlainBean bean = new PlainBean();
      AOPProxyFactoryMixin[] mixins = {
            new AOPProxyFactoryMixin(SimpleMixin.class, new Class[]{Simple.class}),
            new AOPProxyFactoryMixin(AnotherMixin.class, new Class[] {Another.class})};
      Object proxy = assertCreateProxy(
            bean,
View Full Code Here

   public void testSimpleMixinDefaultConstructor() throws Exception
   {
      SimpleMixin.invoked = false;
      SimpleInterceptor.invoked = null;

      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();
View Full Code Here

   {
      SimpleMixinWithConstructorAndDelegate.invoked = false;
      SimpleMixinWithConstructorAndDelegate.proxy = null;
      SimpleMixinWithConstructorAndDelegate.delegate = null;

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

      Simple simple = (Simple)proxy;
      simple.doSomething();
View Full Code Here

      assertNotNull(SimpleMixinWithConstructorAndDelegate.delegate);
      assertTrue(SimpleMixinWithConstructorAndDelegate.delegate.getClass().equals(Object.class));
      assertNotNull(SimpleInterceptor.invoked);
      assertEquals("doSomething", SimpleInterceptor.invoked.getName());
     
      PlainBean bean = new PlainBean();
      ((Delegate)proxy).setDelegate(bean);
      assertNotNull(SimpleMixinWithConstructorAndDelegate.delegate);
      assertEquals(bean, SimpleMixinWithConstructorAndDelegate.delegate);
   }
View Full Code Here

{
   public void testSimpleMixinDefaultConstructor() throws Exception
   {
      SimpleMixin.invoked = false;

      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();
View Full Code Here

TOP

Related Classes of org.jboss.test.proxyfactory.support.PlainBean

Copyright © 2018 www.massapicom. 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.