|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.verisign.epp.codec.suggestion.util.RandomHelper
public class RandomHelper
This class knows how to construct a random command or response facilitating the random unit test framework.
Constructor Summary | |
---|---|
RandomHelper()
|
Method Summary | |
---|---|
static double |
get()
Get next random double value. |
static EPPSuggestionInfoCmd |
getCommand()
Create an Epp Suggestion Info command. |
static EPPSuggestionInfoResp |
getEmptyGridResponse(java.lang.String aClientTransId)
Create an empty grid response. |
static EPPSuggestionInfoResp |
getEmptyRecordResponse(java.lang.String aClientTransId)
Create an empty record response. |
static EPPSuggestionInfoResp |
getEmptyTableResponse(java.lang.String aClientTransId)
Create an empty table response. |
static int |
getInt()
Get next random int value. |
static int |
getInt(int aMaxValue)
Get next random int value from 0 to aMaxValue. |
static int |
getInt(int n,
int r)
|
static long |
getLong()
Get next random long value. |
static long |
getLong(long aMaxValue)
Get next random int value from 0 to aMaxValue. |
static long |
getLong(long n,
long r)
|
static EPPSuggestionInfoResp |
getResponse(java.lang.String aClientTransId)
There was an issue with empty elements. |
static boolean |
p(double d)
Helper method for random. |
static void |
reset()
Reset the random object. |
static void |
reset(long aSeed)
Reset the random object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomHelper()
Method Detail |
---|
public static double get()
public static int getInt()
public static int getInt(int aMaxValue)
aMaxValue
- a max int value
public static int getInt(int n, int r)
public static long getLong()
public static long getLong(long aMaxValue)
aMaxValue
- a max int value
public static long getLong(long n, long r)
public static EPPSuggestionInfoCmd getCommand() throws InvalidValueException
InvalidValueException
public static EPPSuggestionInfoResp getResponse(java.lang.String aClientTransId) throws InvalidValueException
InvalidValueException
public static EPPSuggestionInfoResp getEmptyTableResponse(java.lang.String aClientTransId)
aClientTransId
- a client transaction id
public static EPPSuggestionInfoResp getEmptyGridResponse(java.lang.String aClientTransId)
aClientTransId
- a client transaction id
public static EPPSuggestionInfoResp getEmptyRecordResponse(java.lang.String aClientTransId) throws InvalidValueException
aClientTransId
- a client transaction id
InvalidValueException
public static void reset()
public static void reset(long aSeed)
aSeed
- a seedpublic static boolean p(double d)
d
- a double value
true
or false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |