@Test public void testGetDataValue() { Column columnA = new Column(); columnA.setType(INTEGER); columnA.setDataSequence(DataSequence.SEQUENTIAL); columnA.setMinValue(1); columnA.setMaxValue(3); generator = new SequentialIntegerDataGenerator(columnA); DataValue result1 = generator.getDataValue(); assertEquals("1", result1.getValue()); DataValue result2 = generator.getDataValue(); assertEquals("2", result2.getValue()); DataValue result3 = generator.getDataValue(); assertEquals("3", result3.getValue()); DataValue result4 = generator.getDataValue(); assertEquals("1", result4.getValue()); }
@Override public DataValue getDataValue() { return new DataValue(columnRule.getType(), String.valueOf((counter.getAndIncrement() % (maxValue - minValue + 1)) + minValue)); }
SequentialIntegerDataGenerator implements RuleBasedDataGenerator { @Override public DataValue getDataValue() { return new DataValue(columnRule.getType(), String.valueOf((counter.getAndIncrement() % (maxValue - minValue + 1)) + minValue)); } }
SequentialIntegerDataGenerator implements RuleBasedDataGenerator { @Override public DataValue getDataValue() { return new DataValue(columnRule.getType(), String.valueOf((counter.getAndIncrement() % (maxValue - minValue + 1)) + minValue)); } SequentialIntegerDataGenerator(Column columnRule); }
SequentialIntegerDataGenerator implements RuleBasedDataGenerator { @Override public DataValue getDataValue() { return new DataValue(columnRule.getType(), String.valueOf((counter.getAndIncrement() % (maxValue - minValue + 1)) + minValue)); } SequentialIntegerDataGenerator(Column columnRule); @Override DataValue getDataValue(); }
SequentialIntegerDataGenerator implements RuleBasedDataGenerator { @Override public DataValue getDataValue() { return new DataValue(columnRule.getType(), String.valueOf((counter.getAndIncrement() % (maxValue - minValue + 1)) + minValue)); } SequentialIntegerDataGenerator(Column columnRule); @Override DataValue getDataValue();  }