Examples of ImmutableWithGenericCollectionsPojo


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

  }

  @Test
  public void testImmutablePojoWithGenerifiedCollectionsInConstructor() {

    ImmutableWithGenericCollectionsPojo pojo = factory
        .manufacturePojo(ImmutableWithGenericCollectionsPojo.class);
    Assert.assertNotNull("The pojo cannot be null!", pojo);

    Collection<OneDimensionalTestPojo> generifiedCollection = pojo
        .getGenerifiedCollection();
    Assert.assertNotNull("The generified collection cannot be null!",
        generifiedCollection);
    Assert.assertFalse("The generified collection cannot be empty!",
        generifiedCollection.isEmpty());
    Assert.assertTrue(
        "The number of elements in the generified collection: "
            + generifiedCollection.size()
            + " does not match the expected value: "
            + ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS,
            generifiedCollection.size() == ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS);

    Map<String, Calendar> generifiedMap = pojo.getGenerifiedMap();
    Assert.assertNotNull("The generified map cannot be null!",
        generifiedMap);
    Assert.assertFalse("The generified map cannot be empty!",
        generifiedMap.isEmpty());
    Assert.assertTrue(
        "The number of elements in the generified map: "
            + generifiedMap.size()
            + " does not match the expected value: "
            + ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS,
            generifiedMap.size() == ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS);

    Set<ImmutableWithNonGenericCollectionsPojo> generifiedSet = pojo
        .getGenerifiedSet();
    Assert.assertNotNull("The generified set cannot be null!",
        generifiedSet);
    Assert.assertFalse("The generified set cannot be empty!",
        generifiedSet.isEmpty());
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.