use of net.andreinc.mockneat.MockNeat in project mockneat by nomemory.
the class GenerateMonths method main.
public static void main(String[] args) {
MockNeat mock = MockNeat.threadLocal();
Month m = mock.months().val();
System.out.println(m);
Month summer = mock.months().rangeClosed(JUNE, AUGUST).val();
System.out.println(summer);
Month beforeSummer = mock.months().before(JUNE).val();
System.out.println(beforeSummer);
String month = mock.months().before(JULY).display(TextStyle.FULL, Locale.CANADA).val();
System.out.println(month);
}
use of net.andreinc.mockneat.MockNeat in project mockneat by nomemory.
the class GeneratePasswords method main.
public static void main(String[] args) {
MockNeat mock = MockNeat.threadLocal();
String medium = mock.passwords().type(MEDIUM).val();
System.out.println(medium);
}
use of net.andreinc.mockneat.MockNeat in project mockneat by nomemory.
the class GenerateProbabilities method main.
public static void main(String[] args) {
MockNeat m = MockNeat.threadLocal();
Map<String, Integer> mp = new HashMap<>();
mp.put("A", 0);
mp.put("B", 0);
mp.put("C", 0);
mp.put("D", 0);
for (int i = 0; i < 1000000; i++) {
String s = m.probabilites(String.class).add(0.1, "A").add(0.2, "B").add(0.5, "C").add(0.2, "D").val();
mp.put(s, mp.get(s) + 1);
}
System.out.println(mp);
Integer x = m.probabilites(Integer.class).add(0.2, m.ints().range(0, 100)).add(0.5, m.ints().range(100, 200)).add(0.3, m.ints().range(200, 300)).val();
System.out.println(x);
}
use of net.andreinc.mockneat.MockNeat in project mockneat by nomemory.
the class GenerateSeq method main.
public static void main(String[] args) {
MockNeat mock = MockNeat.threadLocal();
List<String> list = Arrays.asList("a", "b", "c", "d");
mock.seq(list).cycle(true).list(100).consume(System.out::println);
// Prints ["a", "b", "c", "d", "a", "b"....]
mock.seq(list).after("X").list(100).consume(System.out::println);
// Prints ["a", "b", "c", "d", "X", "X"...."X"]
}
use of net.andreinc.mockneat.MockNeat in project mockneat by nomemory.
the class GenerateShufflers method main.
public static void main(String[] args) {
MockNeat mockNeat = MockNeat.threadLocal();
int[] x = { 1, 2, 3, 4, 5, 6 };
mockNeat.shufflers().arrayInt(x).stream().val().limit(5).forEach(arr -> System.out.println(Arrays.toString(arr)));
}
Aggregations