Package uk.co.jemos.podam.test.unit

Source Code of uk.co.jemos.podam.test.unit.ArrayUnitTest

package uk.co.jemos.podam.test.unit;

import org.junit.Assert;
import org.junit.Test;

import uk.co.jemos.podam.api.PodamFactory;
import uk.co.jemos.podam.api.PodamFactoryImpl;
import uk.co.jemos.podam.test.dto.ArrayPojo;

public class ArrayUnitTest {

  @Test
  public void testArrayCreation() throws Exception {

    PodamFactory podam = new PodamFactoryImpl();
    ArrayPojo pojo = podam.manufacturePojo(ArrayPojo.class);

    Assert.assertNotNull(pojo);

    String[] array = pojo.getMyStringArray();
    Assert.assertTrue("The array should not be empty", array.length > 0);
    for (String string : array) {
      Assert.assertTrue(
          "The length of each string in the array should be > 0",
          string.length() > 0);
    }

  }

}
TOP

Related Classes of uk.co.jemos.podam.test.unit.ArrayUnitTest

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.