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

Examples of uk.co.jemos.podam.test.dto.annotations.ShortValuePojo


  }

  @Test
  public void testShortValueAnnotation() {

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

    short shortFieldWithMinValueOnly = pojo.getShortFieldWithMinValueOnly();
    Assert.assertTrue(
        "The short attribute with min value only should have a value greater than "
            + PodamTestConstants.NUMBER_INT_MIN_VALUE,
            shortFieldWithMinValueOnly >= PodamTestConstants.NUMBER_INT_MIN_VALUE);

    short shortFieldWithMaxValueOnly = pojo.getShortFieldWithMaxValueOnly();
    Assert.assertTrue(
        "The short attribute with max value only should have a value less than: "
            + PodamTestConstants.NUMBER_INT_ONE_HUNDRED,
            shortFieldWithMaxValueOnly <= PodamTestConstants.NUMBER_INT_ONE_HUNDRED);

    short shortFieldWithMinAndMaxValue = pojo
        .getShortFieldWithMinAndMaxValue();
    Assert.assertTrue(
        "The short field with min and max values should have a value beetween "
            + PodamTestConstants.NUMBER_INT_MIN_VALUE + " and "
            + PodamTestConstants.NUMBER_INT_MAX_VALUE,
            shortFieldWithMinAndMaxValue >= PodamTestConstants.NUMBER_INT_MIN_VALUE
            && shortFieldWithMinAndMaxValue <= PodamTestConstants.NUMBER_INT_ONE_HUNDRED);

    Short shortObjectFieldWithMinValueOnly = pojo
        .getShortObjectFieldWithMinValueOnly();
    Assert.assertNotNull(
        "The short object field with min value only should not be null!",
        shortObjectFieldWithMinValueOnly);
    Assert.assertTrue(
        "The short object attribute with min value only should have a value greater than "
            + PodamTestConstants.NUMBER_INT_MIN_VALUE,
            shortObjectFieldWithMinValueOnly >= PodamTestConstants.NUMBER_INT_MIN_VALUE);

    Short shortObjectFieldWithMaxValueOnly = pojo
        .getShortObjectFieldWithMaxValueOnly();
    Assert.assertNotNull(
        "The short object field with max value only should not be null!",
        shortObjectFieldWithMaxValueOnly);
    Assert.assertTrue(
        "The short object attribute with max value only should have a value less than: "
            + PodamTestConstants.NUMBER_INT_ONE_HUNDRED,
            shortObjectFieldWithMaxValueOnly <= PodamTestConstants.NUMBER_INT_ONE_HUNDRED);

    Short shortObjectFieldWithMinAndMaxValue = pojo
        .getShortObjectFieldWithMinAndMaxValue();
    Assert.assertNotNull(
        "The short object field with max value only should not be null!",
        shortObjectFieldWithMinAndMaxValue);
    Assert.assertTrue(
        "The short object field with min and max values should have a value beetween "
            + PodamTestConstants.NUMBER_INT_MIN_VALUE + " and "
            + PodamTestConstants.NUMBER_INT_ONE_HUNDRED,
            shortObjectFieldWithMinAndMaxValue >= PodamTestConstants.NUMBER_INT_MIN_VALUE
            && shortObjectFieldWithMinAndMaxValue <= PodamTestConstants.NUMBER_INT_ONE_HUNDRED);

    short shortFieldWithPreciseValue = pojo.getShortFieldWithPreciseValue();
    Assert.assertTrue(
        "The short attribute with precise value should have a value of "
            + PodamTestConstants.SHORT_PRECISE_VALUE
            + " but instead it had a value of "
            + shortFieldWithPreciseValue,
View Full Code Here

TOP

Related Classes of uk.co.jemos.podam.test.dto.annotations.ShortValuePojo

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.