Examples of RandomFunction


Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

  public Function random(Class<? extends BigDecimal> clazz, MathContext mc) {
      return new RandomFunction(clazz, mc);
  }

  public Function random(Object... dataset) {
    return new RandomFunction(dataset);
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

  public Function random(Object... dataset) {
    return new RandomFunction(dataset);
  }
 
  public Function random(Class<?> clazz, Range range) {
    return new RandomFunction(clazz, range);
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

public class RandomFunctionTest {

    @Test
    public void randomByteTest() {
        Object value = new RandomFunction(Byte.class).generateValue();
        assertNotNull("Generated byte must not be null", value);
        assertTrue("Generated value is not a byte", value instanceof Byte);
    }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

        assertTrue("Generated value is not a byte", value instanceof Byte);
    }
   
    @Test
    public void randomShortTest() {
        Object value = new RandomFunction(Short.class).generateValue();
        assertNotNull("Generated short must  not be null", value);
        assertTrue("Generated value is not a short", value instanceof Short);
    }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

        assertTrue("Generated value is not a short", value instanceof Short);
    }

  @Test
  public void randomIntegerTest() {
    Object value = new RandomFunction(Integer.class).generateValue();
    assertNotNull("Generated integer can not be null", value);
    assertTrue("Generated value is not a Integer", value instanceof Integer);
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

    assertTrue("Generated value is not a Integer", value instanceof Integer);
  }

    @Test
    public void randomLongTest() {
        Object value = new RandomFunction(Long.class).generateValue();
        assertNotNull("Generated long can not be null", value);
        assertTrue("Generated value is not a Long", value instanceof Long);
    }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

        assertTrue("Generated value is not a Long", value instanceof Long);
    }
   
  @Test
  public void randomFloatTest() {
    Object value = new RandomFunction(Float.class).generateValue();
    assertNotNull("Generated float can not be null", value);
    assertTrue("Generated value is not a Float", value instanceof Float);
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

    assertTrue("Generated value is not a Float", value instanceof Float);
  }

  @Test
  public void randomDoubleTest() {
    Object value = new RandomFunction(Double.class).generateValue();
    assertNotNull("Generated double can not be null", value);
    assertTrue("Generated value is not a Double", value instanceof Double);
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

    assertTrue("Generated value is not a Double", value instanceof Double);
  }

  @Test
  public void randomBigDecimalTest() {
      Object value = new RandomFunction(BigDecimal.class).generateValue();
      assertNotNull("Generated BigDecimal must not be null", value);
      assertTrue("Generated value is not a BigDecimal", value instanceof BigDecimal);
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.RandomFunction

      assertTrue("Generated value is not a BigDecimal", value instanceof BigDecimal);
  }
 
  @Test
  public void randomBigDecimalWithMathContextTest() {
      Object value = new RandomFunction(BigDecimal.class, new MathContext(3, RoundingMode.HALF_EVEN)).generateValue();
      assertNotNull("Generated BigDecimal must not be null", value);
      assertTrue("Generated value is not a BigDecimal", value instanceof BigDecimal);
      assertTrue("Generated value should have a precision of 3", ((BigDecimal) value).precision() == 3);
  }
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.