Package com.atlassian.confluence
Class RandomnessHandler
- java.lang.Object
-
- com.atlassian.confluence.RandomnessHandler
-
@Deprecated public class RandomnessHandler extends Object
Deprecated.since 5.8. Please use confluence-test-utils module instead. See {com.atlassian.confluence.test.utils.RandomnessHandler} alternativeHandles the control of pseudorandomness in tests. We want to be able to reproduce the same "random" behaviour when required. We also want to be able to remove randomness completely at times.
-
-
Constructor Summary
Constructors Constructor Description RandomnessHandler(String seed, String isRandom)
Deprecated.Constructor, which for convenience takes the arguments as strings to be converted, rather than the appropriate primitives.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
isRandom()
Deprecated.boolean
nextBoolean()
Deprecated.int
nextInt(int limit)
Deprecated.String
toString()
Deprecated.Debugging information important so that we know what the tests were doing.
-
-
-
Constructor Detail
-
RandomnessHandler
public RandomnessHandler(String seed, String isRandom)
Deprecated.Constructor, which for convenience takes the arguments as strings to be converted, rather than the appropriate primitives.- Parameters:
seed
- The seed with which to initialise randomness. Can be null, in which case a seed will be created based on current time.isRandom
- if not null and not true then the handler produced will be entirely non-random.
-
-
Method Detail
-
toString
public String toString()
Deprecated.Debugging information important so that we know what the tests were doing.
-
nextBoolean
public boolean nextBoolean()
Deprecated.- Returns:
- returns true when randomness is switched off or a random boolean.
-
nextInt
public int nextInt(int limit)
Deprecated.- Returns:
- returns 0 when randomness is switched off or a random int less than limit.
- See Also:
Random.nextInt(int)
-
isRandom
public boolean isRandom()
Deprecated.
-
-