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

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


  }

  @Test
  public void testDoubleValueAnnotation() {

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

    double doubleFieldWithMinValueOnly = pojo
        .getDoubleFieldWithMinValueOnly();
    Assert.assertTrue(
        "The double attribute with min value only must have a value greater than "
            + PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE,
            doubleFieldWithMinValueOnly >= PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE);

    double doubleFieldWithMaxValueOnly = pojo
        .getDoubleFieldWithMaxValueOnly();
    Assert.assertTrue(
        "The double attribute with max value only must have a value less or equal to "
            + PodamTestConstants.NUMBER_DOUBLE_ONE_HUNDRED,
            doubleFieldWithMaxValueOnly <= PodamTestConstants.NUMBER_DOUBLE_ONE_HUNDRED);

    double doubleFieldWithMinAndMaxValue = pojo
        .getDoubleFieldWithMinAndMaxValue();
    Assert.assertTrue(
        "The double attribute with min and mx value must have a value between "
            + PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE + " and "
            + PodamTestConstants.NUMBER_DOUBLE_MAX_VALUE,
            doubleFieldWithMinAndMaxValue >= PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE
            && doubleFieldWithMinAndMaxValue <= PodamTestConstants.NUMBER_DOUBLE_MAX_VALUE);

    double doubleFieldWithPreciseValue = pojo
        .getDoubleFieldWithPreciseValue();
    Assert.assertTrue(
        "The double field with precise value should have a value of: "
            + PodamTestConstants.DOUBLE_PRECISE_VALUE,
            doubleFieldWithPreciseValue == Double
            .valueOf(PodamTestConstants.DOUBLE_PRECISE_VALUE));

    Double doubleObjectFieldWithPreciseValue = pojo
        .getDoubleObjectFieldWithPreciseValue();
    Assert.assertNotNull(
        "The double object field with precise value cannot be null!",
        doubleObjectFieldWithPreciseValue);
    Assert.assertTrue(
View Full Code Here

TOP

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

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.