Examples of PodamFactoryImpl


Examples of uk.co.jemos.podam.api.PodamFactoryImpl

  @Test
  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.PodamFactoryImpl

  @Test
  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.PodamFactoryImpl

  @Test
  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.PodamFactoryImpl

  private PodamFactory factory;

  @Before
  public void setUp() throws Exception {
    strategy = RandomDataProviderStrategy.getInstance();
    factory = new PodamFactoryImpl(strategy);
  }
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactoryImpl

*/
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.PodamFactoryImpl

public class FloatExtUnitTest {

  @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.PodamFactoryImpl

  }

  @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.PodamFactoryImpl

public class Pdm4PojoUnitTest {

  @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.PodamFactoryImpl

    }
  }

  @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.PodamFactoryImpl

  private PodamFactory factory;

  @Before
  public void init() {

    factory = new PodamFactoryImpl(RandomDataProviderStrategy.getInstance());

  }
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.