Package uk.co.jemos.podam.test.dto

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


  }

  @Test
  public void testImmutablePojoWithNonGenericCollections() {

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

    @SuppressWarnings("unchecked")
    Collection<Object> nonGenerifiedCollection = pojo
    .getNonGenerifiedCollection();
    Assert.assertNotNull("The non-generified collection cannot be null!",
        nonGenerifiedCollection);
    Assert.assertFalse("The non-generified collection cannot be empty!",
        nonGenerifiedCollection.isEmpty());
    Assert.assertTrue(
        "The number of elements in the collection: "
            + nonGenerifiedCollection.size()
            + " does not match the expected value: "
            + ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS,
            nonGenerifiedCollection.size() == ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS);

    @SuppressWarnings("unchecked")
    Set<Object> nonGenerifiedSet = pojo.getNonGenerifiedSet();
    Assert.assertNotNull("The non-generified Set cannot be null!",
        nonGenerifiedSet);
    Assert.assertFalse("The non-generified Set cannot be empty!",
        nonGenerifiedSet.isEmpty());
    Assert.assertTrue(
        "The number of elements in the Set: " + nonGenerifiedSet.size()
        + " does not match the expected value: "
        + ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS,
        nonGenerifiedSet.size() == ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS);

    @SuppressWarnings("unchecked")
    Map<Object, Object> nonGenerifiedMap = pojo.getNonGenerifiedMap();
    Assert.assertNotNull("The non-generified map cannot be null!",
        nonGenerifiedMap);
    Assert.assertFalse("The non generified map cannot be empty!",
        nonGenerifiedMap.isEmpty());
    Assert.assertTrue(
View Full Code Here

TOP

Related Classes of uk.co.jemos.podam.test.dto.ImmutableWithNonGenericCollectionsPojo

Copyright © 2018 www.massapicom. 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.