-
-
Notifications
You must be signed in to change notification settings - Fork 47
Creating a MockNeat object
Andrei Ciobanu edited this page Feb 25, 2017
·
6 revisions
MockNeat
is the main class of the library and the source of all evil.
To obtain a MockNeat
instance:
- Re-use the default instance of a
MockNeat
class that internally uses a ThreadLocalRandom implementation from the Java library.
MockNeat mock = MockNeat.threadLocal();
- Re-use the default instance of a
MockNeat
class that internally uses a SecureRandom implementation from the Java library.
MockNeat mock = MockNeat.secure();
- Re-use the default instance of a
MockNeat
class that internally uses the old Random class from the Java library.
MockNeat mock = MockNeat.old();
- Call the constructor:
Long seed = 123l;
MockNeat mock = new MockNeat(RandomType.SECURE, seed);
Using the library:
Real World Examples: