Examples of PojoWithMapsAndCollections


Examples of uk.co.jemos.podam.test.dto.PojoWithMapsAndCollections

  @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),
        pojo.getArray().length);
    Assert.assertNotNull("List is null", pojo.getList());
    Assert.assertEquals(
        strategy.getNumberOfCollectionElements(Object.class),
        pojo.getList().size());
    Assert.assertNotNull("Map is null", pojo.getMap());
    Assert.assertEquals(
        strategy.getNumberOfCollectionElements(Object.class),
        pojo.getMap().size());

  }
View Full Code Here

Examples of uk.co.jemos.podam.test.dto.PojoWithMapsAndCollections

  @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());
    Assert.assertEquals(3, pojo.getList().size());
    Assert.assertNotNull("Map is null", pojo.getMap());
    Assert.assertEquals(4, pojo.getMap().size());

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