Examples of SimplePOJO


Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

   public void testTypedef()
   {
      TypedefAspect.reset();
     
      SimplePOJO pojo = (SimplePOJO)getBean("Bean");
      pojo.method();
     
      assertTrue(TypedefAspect.invoked);
   }
View Full Code Here

Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

   }

   public void testInterceptor()
   {
      TestInterceptor.reset();
      SimplePOJO pojoA = (SimplePOJO)getBean("BeanA");
      pojoA.method();
      assertEquals(1, TestInterceptor.invoked);
     
      //Now check that the scope was honoured
      TestInterceptor testA = TestInterceptor.last;
      TestInterceptor.reset();
      pojoA.method();
      assertEquals(1, TestInterceptor.invoked);
      assertSame(testA, TestInterceptor.last);
     
      TestInterceptor.reset();
      SimplePOJO pojoB = (SimplePOJO)getBean("BeanB");
      pojoB.method();
      assertEquals(1, TestInterceptor.invoked);
      assertNotSame(testA, TestInterceptor.last);
   }
View Full Code Here

Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

      super(name);
   }

   public void testIntroductionsAndMixins() throws Exception
   {
      SimplePOJO pojo = getBean();
      System.out.println("-------------->" + Arrays.asList(pojo.getClass().getInterfaces()));

      assertInstanceOf(pojo, EmptyInterface1.class);
      assertInstanceOf(pojo, EmptyInterface2.class);
      assertInstanceOf(pojo, EmptyInterface3.class);
View Full Code Here

Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

   public void testIntrodution()
   {
      DynamicCFlowAspect.reset();
     
      SimplePOJO pojo = (SimplePOJO)getBean("Bean");
      pojo.method();
      assertFalse(DynamicCFlowAspect.invoked);
     
      DynamicCFlowImpl.setFlag(true);
     
      pojo.method();
      assertTrue(DynamicCFlowAspect.invoked);
     
   }
View Full Code Here

Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

   public void testIntrodution()
   {
      NamedPointcutAspect.reset();
     
      SimplePOJO pojo = (SimplePOJO)getBean("Bean");
      pojo.method();
     
      assertTrue(NamedPointcutAspect.invoked);
   }
View Full Code Here

Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

   public void testPrecedence()
   {
      Interceptions.clear();
     
      SimplePOJO pojo = (SimplePOJO)getBean("Bean");
      pojo.method();
     
      List<Integer> interceptions = Interceptions.getInterceptions();
      assertEquals(4, interceptions.size());
     
      for (int i = 0 ; i < 4 ; i++)
View Full Code Here

Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

   }

   public void testAspect()
   {
      TestAspect.reset();
      SimplePOJO pojoA = (SimplePOJO)getBean("BeanA");
      pojoA.method();
      assertEquals(1, TestAspect.invoked);
      assertEquals(1, TestAspect.advice);
     
      //Now check that the scope was honoured
      TestAspect testA = TestAspect.last;
     
      TestAspect.reset();
      pojoA.anotherMethod();
      assertEquals(1, TestAspect.invoked);
      assertEquals(2, TestAspect.advice);
      assertSame(testA, TestAspect.last);
     
      TestAspect.reset();
      SimplePOJO pojoB = (SimplePOJO)getBean("BeanB");
      pojoB.method();
      assertEquals(1, TestAspect.invoked);
      assertEquals(1, TestAspect.advice);
      assertNotSame(testA, TestAspect.last);
   }
View Full Code Here

Examples of org.jboss.test.microcontainer.annotatedaop.SimplePOJO

      assertFalse(TestCFlowInterceptor.invoked);
   }
  
   private void makeCall()
   {
      SimplePOJO pojo = (SimplePOJO)getBean("Bean");
      pojo.method();
   }
View Full Code Here

Examples of org.monjo.example.SimplePOJO

    DBObject docFromMongo = getFromMongo(document.get("_id"));

    DocumentToObjectConverter<SimplePOJO> converter = MonjoConverterFactory.getInstance().getDefaultDocumentConverter(SimplePOJO.class);

    SimplePOJO convertedObject = converter.from(docFromMongo).to();
    assertThat(convertedObject.getaField(), is(equalTo("aFieldValue")));
    assertThat(convertedObject.getAnotherField(), is(equalTo("anotherFieldValue")));
  }
View Full Code Here

Examples of org.monjo.example.SimplePOJO

    DBObject docFromMongo = getFromMongo(document.get("_id"));

    DocumentToObjectConverter<SimplePOJO> converter = MonjoConverterFactory.getInstance().getDefaultDocumentConverter(SimplePOJO.class);

    SimplePOJO convertedObject = converter.from(docFromMongo).to();
    assertThat(convertedObject.getaField(), is(equalTo("aFieldValue")));
    assertThat(convertedObject.getAnotherField(), is(nullValue()));

    verify(doc, never()).get("anotherField");
  }
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.