Examples of manufacturePojo()


Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  public void testRandomDataProviderStrategy() {

    strategy = RandomDataProviderStrategy.getInstance();
    PodamFactory factory = new PodamFactoryImpl(strategy);
    PojoWithMapsAndCollections pojo =
        factory.manufacturePojo(PojoWithMapsAndCollections.class);

    Assert.assertNotNull("POJO manufacturing failed", pojo);
    Assert.assertNotNull("Array is null", pojo.getArray());
    Assert.assertEquals(
        strategy.getNumberOfCollectionElements(Object.class),
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  public void testCustomRandomDataProviderStrategy() {

    strategy = new CustomRandomDataProviderStrategy();
    PodamFactory factory = new PodamFactoryImpl(strategy);
    PojoWithMapsAndCollections pojo =
        factory.manufacturePojo(PojoWithMapsAndCollections.class);

    Assert.assertNotNull("POJO manufacturing failed", pojo);
    Assert.assertNotNull("Array is null", pojo.getArray());
    Assert.assertEquals(2, pojo.getArray().length);
    Assert.assertNotNull("List is null", pojo.getList());
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  public void testRandomProviderStrategyForLong() {

    strategy = new CustomRandomDataProviderStrategy();
    PodamFactory factory = new PodamFactoryImpl(strategy);
    Map<Long,String> pojo =
        factory.manufacturePojo(HashMap.class, Long.class, String.class);

    Assert.assertNotNull("POJO manufacturing failed", pojo);
    Assert.assertEquals("Wrong map size",
        strategy.getNumberOfCollectionElements(String.class),
        pojo.size());
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

public class PackagePrivatePojoTest {

  @Test
  public void testPackagePrivateClassInstantiation() {
    PodamFactory factory = new PodamFactoryImpl();
    PackagePrivatePojo pojo = factory
        .manufacturePojo(PackagePrivatePojo.class);
    Assert.assertNotNull(pojo);
    Assert.assertNotNull(pojo.getValue());

  }
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void testFloatPojo() {

    PodamFactory podam = new PodamFactoryImpl();

    FloatExt<Float> pojo = podam.manufacturePojo(FloatExt.class,
        Float.class);

    Assert.assertNotNull(pojo);

  }
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void testFloat2Pojo() {

    PodamFactory podam = new PodamFactoryImpl();

    FloatExt2 pojo = podam.manufacturePojo(FloatExt2.class);

    Assert.assertNotNull(pojo);

  }
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void testPdm4Pojo() {

    PodamFactory factory = new PodamFactoryImpl();
    Pdm4PojoWithSetters pojo = factory.manufacturePojo(Pdm4PojoWithSetters.class);
    assertNotNull(pojo);
    assertEquals("Invocation order has changed", 4, pojo.invocationOrder.size());
    assertEquals("Invocation order has changed", "PodamConstructor", pojo.invocationOrder.get(0));
    assertEquals("Invocation order has changed", "no-op", pojo.invocationOrder.get(1));
    assertEquals("Invocation order has changed", "InputStream", pojo.invocationOrder.get(2));
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void testConstructionFailure(){
    PodamFactory factory = new PodamFactoryImpl();
    NonInstantiatableClass innerClassPojo =
        factory.manufacturePojo(NonInstantiatableClass.class);
    Assert.assertNull(innerClassPojo);
  }
}
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

          return "classic";
        }
      }
    });

    Assert.assertEquals(factory.manufacturePojo(PojoClassic.class).getAtt(), "classic");
    Assert.assertEquals(factory.manufacturePojo(PojoSpecific.class).getAtt(), "specific");


  }
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

        }
      }
    });

    Assert.assertEquals(factory.manufacturePojo(PojoClassic.class).getAtt(), "classic");
    Assert.assertEquals(factory.manufacturePojo(PojoSpecific.class).getAtt(), "specific");


  }

  public static class PojoClassic {
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.