Examples of SimplePOJO


Examples of com.netflix.governator.guice.mocks.SimplePojo

                    ProviderBinderUtil.bind(binder(), SimpleProviderAlt.class, Scopes.SINGLETON);
                }
            }
        );

        SimplePojo pojo = injector.getInstance(SimplePojo.class);
        Assert.assertEquals(pojo.getI(), 1);
        Assert.assertEquals(pojo.getS(), "one");

        SimplePojoAlt pojoAlt = injector.getInstance(SimplePojoAlt.class);
        Assert.assertEquals(pojoAlt.getL(), 3);
        Assert.assertEquals(pojoAlt.getD(), 4.5);
    }
View Full Code Here

Examples of com.papercut.silken.test.SimplePojo

    private ComplexPojo complexPojo;
   
    @Before
    public void setup() {
       
        simplePojo = new SimplePojo();
        simplePojo.setBoolValue(false);
        simplePojo.setStringValue("simple-string");
        simplePojo.setIntValue(12345);
       
        complexPojo = new ComplexPojo();
View Full Code Here

Examples of com.papercut.silken.test.SimplePojo

    }
   
  @Test
  public void toSoyCompatibleMap_simplePojo_createsMap() {
    // arrange
    SimplePojo pojo = new SimplePojo();
   
    // act
    Map<String, ?> resultMap = Utils.toSoyCompatibleMap(pojo);
   
    // assert
View Full Code Here

Examples of org.jboss.ejb3.test.common.registrar.SimplePojo

    * @throws Throwable
    */
   @Test
   public void testRegistrarLookup() throws Throwable
   {
      SimplePojo pojo = (SimplePojo) Ejb3RegistrarLocator.locateRegistrar().lookup(
            Ejb3RegistrarTestCaseBase.REGISTRY_NAME_POJO);
      TestCase.assertNotNull("Retrieved POJO from Registry was null", pojo);
   }
View Full Code Here

Examples of org.jboss.ejb3.test.common.registrar.SimplePojo

   public void testRegistrarBindAndLookup() throws Throwable
   {
      // Initialize
      String bindName = "org.jboss.ejb3.TestBind" + UUID.randomUUID();
      String propertyValue = "propValue";
      SimplePojo pojo = new SimplePojo();
      pojo.setProperty(propertyValue);

      // Bind
      Ejb3RegistrarLocator.locateRegistrar().bind(bindName, pojo);

      // Lookup
      SimplePojo retrieved = (SimplePojo) Ejb3RegistrarLocator.locateRegistrar().lookup(bindName);

      // Test
      TestCase
            .assertTrue("Retrieved value is not equal by reference to what was put in to registry", pojo == retrieved);
      TestCase.assertEquals("Set property was not equal to that which was put into Registry", propertyValue, retrieved
            .getProperty());
   }
View Full Code Here

Examples of org.jboss.ejb3.test.spec_3_2_1.SimplePojo

    * @param remote
    * @throws Throwable
    */
   private void testPassByValueForMethodParameters(MyRemote remote) throws Throwable
   {
      SimplePojo localSimplePojo = new SimplePojo();

      // set some initial value
      int value = 3;
      localSimplePojo.setTransientField(value);
      // call the method on the bean
      SimplePojo returnedPojo = remote.changeAndReturn(localSimplePojo);

      // The passed and the returned objects should not be the same
      assertFalse(
            "The object passed to the method of the remote bean and the object returned from the bean are both the same",
            localSimplePojo == returnedPojo);

      // Any value changed in the method of the remote bean should not
      // affect the local object - Confirms pass by value
      assertEquals("The object passed to a method of remote bean was modified(passed by reference)", localSimplePojo
            .getTransientField(), value);

      SimplePojo anotherPojo = new SimplePojo();
      SimplePojo returnedObj = remote.doNothingAndReturn(anotherPojo);

      // The passed and the returned objects should not be the same
      assertFalse(
            "The object passed to the method of the remote bean and the object returned from the bean are both the same",
            anotherPojo == returnedObj);
View Full Code Here

Examples of org.jboss.ejb3.test.spec_3_2_1.SimplePojo

    * @param remote
    * @throws Throwable
    */
   private void testPassByValueForReturnedObject(MyRemote remote) throws Throwable
   {
      SimplePojo returnedPojo = remote.getPojo();
      log.info("Returned object has value = " + returnedPojo.getTransientField());
      assertTrue("The object returned from the remote bean is passed by reference",
            returnedPojo.getTransientField() == 0);

   }
View Full Code Here

Examples of org.jboss.test.kernel.deployment.jboss.beans.simplepojo.SimplePOJO

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

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

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

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

      super(name);
   }

   public void testPrepare()
   {
      SimplePOJO pojo = (SimplePOJO)getBean("Bean");
      assertInstanceOf(pojo, Advised.class);
   }
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.