org.test4j.datafilling.strategy
接口 DataFactory

所有已知实现类:
RandomDataFactory

public interface DataFactory

This interface defines the contact for data providers.


方法摘要
 Byte getByte(AttributeInfo attribute)
          It returns a byte/Byte value.
 Byte getByteInRange(byte minValue, byte maxValue, AttributeInfo attribute)
          It returns a byte/Byte within min and max value (included).
 Character getCharacter(AttributeInfo attribute)
          It returns a char/Character value.
 Character getCharacterInRange(char minValue, char maxValue, AttributeInfo attribute)
          It returns a char/Character value between min and max value (included).
 Double getDouble(AttributeInfo attribute)
          It returns a double/Double value
 Double getDoubleInRange(double minValue, double maxValue, AttributeInfo attribute)
          It returns a double/Double value between min and max value (included).
 Float getFloat(AttributeInfo attribute)
          It returns a float/Float value.
 Float getFloatInRange(float minValue, float maxValue, AttributeInfo attribute)
          It returns a float/Float value between min and max value (included).
 Integer getInteger(AttributeInfo attribute)
          It returns an int/Integer value.
 int getIntegerInRange(int minValue, int maxValue, AttributeInfo attribute)
          It returns an int/Integer value between min and max value (included).
 Long getLong(AttributeInfo attribute)
          It returns a long/Long value.
 Long getLongInRange(long minValue, long maxValue, AttributeInfo attribute)
          It returns a long/Long value between min and max value (included).
 Short getShort(AttributeInfo attribute)
          It returns a short/Short value.
 Short getShortInRange(short minValue, short maxValue, AttributeInfo attribute)
          It returns a short/Short value between min and max value (included).
 String getStringOfLength(int length, AttributeInfo attribute)
          It returns a String of length characters.
 String getStringValue(AttributeInfo attribute)
          It returns a string value
 

方法详细信息

getByte

Byte getByte(AttributeInfo attribute)
It returns a byte/Byte value.


getByteInRange

Byte getByteInRange(byte minValue,
                    byte maxValue,
                    AttributeInfo attribute)
It returns a byte/Byte within min and max value (included).

参数:
minValue - The minimum value for the returned value
maxValue - The maximum value for the returned value
返回:
A byte/Byte within min and max value (included).

getCharacter

Character getCharacter(AttributeInfo attribute)
It returns a char/Character value.


getCharacterInRange

Character getCharacterInRange(char minValue,
                              char maxValue,
                              AttributeInfo attribute)
It returns a char/Character value between min and max value (included).

参数:
minValue - The minimum value for the returned value
maxValue - The maximum value for the returned value
返回:
A char/Character value between min and max value (included).

getDouble

Double getDouble(AttributeInfo attribute)
It returns a double/Double value


getDoubleInRange

Double getDoubleInRange(double minValue,
                        double maxValue,
                        AttributeInfo attribute)
It returns a double/Double value between min and max value (included).

参数:
minValue - The minimum value for the returned value
maxValue - The maximum value for the returned value
返回:
A double/Double value between min and max value (included)

getFloat

Float getFloat(AttributeInfo attribute)
It returns a float/Float value.


getFloatInRange

Float getFloatInRange(float minValue,
                      float maxValue,
                      AttributeInfo attribute)
It returns a float/Float value between min and max value (included).

参数:
minValue - The minimum value for the returned value
maxValue - The maximum value for the returned value
返回:
A float/Float value between min and max value (included).

getInteger

Integer getInteger(AttributeInfo attribute)
It returns an int/Integer value.


getIntegerInRange

int getIntegerInRange(int minValue,
                      int maxValue,
                      AttributeInfo attribute)
It returns an int/Integer value between min and max value (included).

参数:
minValue - The minimum value for the returned value
maxValue - The maximum value for the returned value
返回:
An int/Integer value between min and max value (included).

getLong

Long getLong(AttributeInfo attribute)
It returns a long/Long value.


getLongInRange

Long getLongInRange(long minValue,
                    long maxValue,
                    AttributeInfo attribute)
It returns a long/Long value between min and max value (included).

参数:
minValue - The minimum value for the returned value
maxValue - The maximum value for the returned value
返回:
A long/Long value between min and max value (included).

getShort

Short getShort(AttributeInfo attribute)
It returns a short/Short value.


getShortInRange

Short getShortInRange(short minValue,
                      short maxValue,
                      AttributeInfo attribute)
It returns a short/Short value between min and max value (included).

参数:
minValue - The minimum value for the returned value
maxValue - The maximum value for the returned value
返回:
A short/Short value between min and max value (included).

getStringValue

String getStringValue(AttributeInfo attribute)
It returns a string value


getStringOfLength

String getStringOfLength(int length,
                         AttributeInfo attribute)
It returns a String of length characters.

参数:
length - The number of characters required in the returned String
返回:
A String of length characters


Copyright © 2013. All rights reserved.