public class TestConfigFcns
extends java.lang.Object
| Constructor and Description |
|---|
TestConfigFcns() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
duplicate(java.lang.String val,
int n)
Duplicates a value n times and returns it as a list.
|
static java.lang.String |
duplicate(java.lang.String val,
int n,
boolean useComma)
Same as {@link #duplicate(String,int) but comma-separates the values if
asked.
|
static java.lang.String |
duplicateEnforced(java.lang.String val,
java.lang.String enforced,
int n)
Duplicates a value n times and returns it as a list, complaining if it
is not the enforced value.
|
static java.lang.String |
duplicateString(java.lang.String val,
int n,
boolean useComma)
Same as
duplicate(String,int,boolean) but puts each value in a
quoted string. |
static java.lang.String |
generateDoubleSuffixedFixedNames(java.lang.String prefix,
int n,
int m)
Generates a list of strings with the specified prefix and suffixed x_y,
where x is fixed and y varies 1,...,m.
|
static java.lang.String |
generateDoubleSuffixedFixedNames(java.lang.String prefix,
int n,
int m,
boolean useComma)
Same as
generateDoubleSuffixedNames(String,int,int,boolean)
but comma-separates the names if asked. |
static java.lang.String |
generateDoubleSuffixedNames(java.lang.String prefix,
int n,
int m,
boolean varyFirst)
Generates a list of strings with the specified prefix and suffixed x_y,
where x varies 1,...,n and y varies 1,...,m, and x varies first if
varyFirst is true, else y.
|
static java.lang.String |
generateDoubleSuffixedNames(java.lang.String prefix,
int n,
int m,
boolean varyFirst,
boolean useComma)
Same as
generateDoubleSuffixedNames(String,int,int,boolean)
but comma-separates the names if asked. |
static java.lang.String |
generateDoubleSuffixedRunsOfNames(java.lang.String prefix,
int n,
int m,
boolean varyFirst)
Same as
generateDoubleSuffixedNames(String,int,int,boolean)
but comma-separates each run of names. |
static java.lang.String |
generateNameListsRepeatedlyShift(java.lang.String prefix,
int n,
int m)
Generates comma-separated lists of strings where each list occurs m times
and the i'th unique list contains n-1 entries formed by suffixing the
specified prefix from i+1 to i-1.
|
static java.lang.String |
generateNames(java.lang.String prefix,
int n)
Generates a list of strings with the specified prefix and suffixed 1,...,n.
|
static java.lang.String |
generateNames(java.lang.String prefix,
int n,
boolean useComma)
Same as
generateNames(String,int) but comma-separates the names
if asked. |
static java.lang.String |
generateNames(java.lang.String prefix,
int n,
int m)
Generates a list of strings with the specified prefix and suffixed
m,...,m+n-1.
|
static java.lang.String |
generateNames(java.lang.String prefix,
int n,
int m,
boolean useComma)
Same as
generateNames(String,int,int) but comma-separates the
names if asked. |
static java.lang.String |
generateNames(java.lang.String prefix,
java.lang.String n,
boolean useComma)
Generates a list of strings with the specified prefix and suffixed 1,...,n.
|
static java.lang.String |
generateNamesRepeatedly(java.lang.String prefix,
int n,
int m,
boolean varyFirst)
Generates a list of strings with the specified prefix and suffixed 1,...,n
with each suffix occurring m times.
|
static java.lang.String |
generateNamesRepeatedlyShift(java.lang.String prefix,
int n,
int m,
boolean varyFirst,
boolean useComma)
Generates a list of strings with the specified prefix and suffixed
2,...,n, 1, with each suffix occurring m times.
|
static java.lang.String |
generateNamesString(java.lang.String prefix,
int n,
boolean useComma)
Same as
generateNames(String,int,boolean) but puts each value in a
quoted string. |
static java.lang.String |
oneof(java.lang.String arg0,
java.lang.String arg1)
Returns a random choice from the supplied arguments.
|
static java.lang.String |
oneof(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
Returns a random choice from the supplied arguments.
|
static java.lang.String |
pool(java.lang.String list,
int n)
Duplicates a list until n values are created, and returns it as a list.
|
static java.lang.String |
poolList(java.lang.String listOfLists,
int n)
Duplicates a list of lists until n values are created from each list, and
returns it as a list.
|
static java.lang.String |
poolList(java.lang.String listOfLists,
int n,
int m)
Duplicates a list of lists until n values are created from each list,
for a total of m pools, and returns it as a list.
|
static java.lang.String |
poolListOfLists(java.lang.String listOfLists,
int n)
Duplicates a list of lists until n lists are created, and returns it as a
list of lists.
|
public static java.lang.String generateNames(java.lang.String prefix,
int n)
public static java.lang.String generateNames(java.lang.String prefix,
java.lang.String n,
boolean useComma)
public static java.lang.String generateNames(java.lang.String prefix,
int n,
boolean useComma)
generateNames(String,int) but comma-separates the names
if asked.public static java.lang.String generateNamesString(java.lang.String prefix,
int n,
boolean useComma)
generateNames(String,int,boolean) but puts each value in a
quoted string.public static java.lang.String generateNames(java.lang.String prefix,
int n,
int m)
public static java.lang.String generateNames(java.lang.String prefix,
int n,
int m,
boolean useComma)
generateNames(String,int,int) but comma-separates the
names if asked.public static java.lang.String generateNamesRepeatedly(java.lang.String prefix,
int n,
int m,
boolean varyFirst)
generateNamesRepeatedly("frip", 3, 2, true) yields: frip1 frip2 frip3 frip1 frip2 frip3.
generateNamesRepeatedly("frip", 3, 2, false) yields: frip1 frip1 frip2 frip2 frip3 frip3.
public static java.lang.String generateNamesRepeatedlyShift(java.lang.String prefix,
int n,
int m,
boolean varyFirst,
boolean useComma)
generateNamesRepeatedlyShift("frip", 3, 2, true, false) yields: frip2 frip3 frip1 frip2 frip3 frip1.
generateNamesRepeatedlyShift("frip", 3, 2, false, true) yields: frip2, frip2, frip3, frip3, frip1, frip1.
public static java.lang.String generateNameListsRepeatedlyShift(java.lang.String prefix,
int n,
int m)
generateNameListsRepeatedlyShift("frip", 3, 2) yields: frip2 frip3, frip2 frip3, frip3 frip1, frip3 frip1, frip1 frip2, frip1 frip2
public static java.lang.String generateDoubleSuffixedNames(java.lang.String prefix,
int n,
int m,
boolean varyFirst)
generateDoubleSuffixedNames("frip", 3, 2, true) yields: frip_1_1 frip_2_1 frip_3_1 frip_1_2 frip_2_2 frip_3_2.
generateDoubleSuffixedNames("frip", 3, 2, false) yields: frip_1_1 frip_1_2 frip_2_1 frip_2_2 frip_3_1 frip_3_2.
public static java.lang.String generateDoubleSuffixedNames(java.lang.String prefix,
int n,
int m,
boolean varyFirst,
boolean useComma)
generateDoubleSuffixedNames(String,int,int,boolean)
but comma-separates the names if asked.public static java.lang.String generateDoubleSuffixedRunsOfNames(java.lang.String prefix,
int n,
int m,
boolean varyFirst)
generateDoubleSuffixedNames(String,int,int,boolean)
but comma-separates each run of names.public static java.lang.String generateDoubleSuffixedFixedNames(java.lang.String prefix,
int n,
int m)
generateDoubleSuffixedNames("frip", 3, 2, true) yields: frip_3_1, frip_3_2.
generateDoubleSuffixedNames("frip", 3, 2, false) yields: frip_3_1 frip_3_2.
public static java.lang.String generateDoubleSuffixedFixedNames(java.lang.String prefix,
int n,
int m,
boolean useComma)
generateDoubleSuffixedNames(String,int,int,boolean)
but comma-separates the names if asked.public static java.lang.String duplicate(java.lang.String val,
int n)
public static java.lang.String duplicateEnforced(java.lang.String val,
java.lang.String enforced,
int n)
public static java.lang.String duplicate(java.lang.String val,
int n,
boolean useComma)
public static java.lang.String duplicateString(java.lang.String val,
int n,
boolean useComma)
duplicate(String,int,boolean) but puts each value in a
quoted string.public static java.lang.String pool(java.lang.String list,
int n)
Example: pool("a b c", 5) = "a b c a b"
Example: pool("a b c", 2) = "a b"
public static java.lang.String poolList(java.lang.String listOfLists,
int n)
Example: poolList("a b, c", 5) = "a b a b a c c c c c"
Example: poolList("a b, c", 2) = "a b c c"
public static java.lang.String poolList(java.lang.String listOfLists,
int n,
int m)
Example: poolList("a b, c", 3, 3) = "a b a c c c a b a"
Example: poolList("a b, c", 2, 5) = "a b c c a b c c a b"
public static java.lang.String poolListOfLists(java.lang.String listOfLists,
int n)
public static java.lang.String oneof(java.lang.String arg0,
java.lang.String arg1)
public static java.lang.String oneof(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.