Skip to content

Commit 12e261c

Browse files
author
Ciobanu, Andrei-Nicolin (UK - EDC)
committed
Creating new version
1 parent 971c2fb commit 12e261c

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

bintray.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.jfrog.bintray'
22

3-
version = '0.1.3'
3+
version = '0.1.4'
44

55
task sourcesJar(type: Jar) {
66
classifier = 'sources'

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ apply plugin: 'java'
1818
apply plugin: 'jacoco'
1919

2020
group 'net.andreinc'
21-
version '0.1.3'
21+
version '0.1.4'
2222

2323
sourceCompatibility = 1.8
2424

examples/net/andreinc/mockneat/ComplexStructure.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ public static void main(String[] args) {
2828

2929
Map<String, List<Map<Set<Integer>, List<Integer>>>> result =
3030
mock.ints()
31-
// List<Integer>
3231
.list(2)
33-
// Map<Set<Integer>, List<Integer>>
3432
.mapKeys(2, mock.ints().set(3)::val)
35-
// List<Map<Set<Integer>, List<Integer>>>
3633
.list(LinkedList.class, 2)
37-
// Map<String, List<Map<Set<Integer>, List<Integer>>>>
38-
.mapKeys(4, mock.strings()::val)
34+
.mapKeys(4, mock.strings().size(5)::val)
3935
.val();
36+
37+
System.out.println(result);
4038
}
4139
}

examples/net/andreinc/mockneat/UserExample.java

+22-2
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,36 @@ public static void main(String[] args) {
88

99
MockNeat m = MockNeat.threadLocal();
1010

11-
User user = m.filler(() -> new User())
11+
User user1 = m.filler(() -> new User())
1212
.setter(User::setUserName,m.users())
1313
.setter(User::setFirstName, m.names().first())
1414
.setter(User::setLastName, m.names().last())
1515
.setter(User::setCreated, m.localDates().thisYear().toUtilDate())
1616
.setter(User::setModified, m.localDates().thisMonth().toUtilDate())
1717
.val();
1818

19-
System.out.println(user);
19+
System.out.println(user1);
2020

21+
User user2 = m.reflect(User.class)
22+
.field("userName", m.users())
23+
.field("firstName", m.names().first())
24+
.field("lastName", m.names().last())
25+
.field("created", m.localDates().thisYear().toUtilDate())
26+
.field("modified", m.localDates().thisMonth().toUtilDate())
27+
.val();
2128

29+
System.out.println(user2);
30+
31+
User user3 = m.constructor(User.class)
32+
.params(
33+
m.users(),
34+
m.names().first(),
35+
m.names().last(),
36+
m.localDates().thisYear().toUtilDate(),
37+
m.localDates().thisMonth().toUtilDate()
38+
)
39+
.val();
40+
41+
System.out.println(user3);
2242
}
2343
}

examples/net/andreinc/mockneat/github/GenerateMarkovs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class GenerateMarkovs {
2626
public static void main(String[] args) {
2727
MockNeat mock = MockNeat.threadLocal();
2828

29-
String text = mock.markovs().size(512).type(KAFKA).val();
29+
String text = mock.markovs().size(1024).type(KAFKA).val();
3030
System.out.println(text);
3131
}
3232
}

0 commit comments

Comments
 (0)