1 |
|
package org.kuali.student.common.validator; |
2 |
|
|
3 |
|
import java.util.ArrayList; |
4 |
|
import java.util.List; |
5 |
|
|
6 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (69) |
Complexity: 4 |
Complexity Density: 0.06 |
|
7 |
|
public class ValidatorMockObjectGenerator { |
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
8 |
6
|
public static ConstraintMockPerson buildTestPerson1() {... |
9 |
6
|
ConstraintMockPerson person = new ConstraintMockPerson(); |
10 |
|
|
11 |
6
|
person.setFirstName("first"); |
12 |
6
|
person.setLastName("last"); |
13 |
6
|
person.setEmail("first@test.com"); |
14 |
6
|
person.setType("STUDENT"); |
15 |
6
|
person.setState("CREATE"); |
16 |
6
|
person.setId("P1"); |
17 |
|
|
18 |
6
|
return person; |
19 |
|
} |
20 |
|
|
21 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
22 |
1
|
public static ConstraintMockPerson buildTestPerson2() {... |
23 |
1
|
ConstraintMockPerson person = new ConstraintMockPerson(); |
24 |
|
|
25 |
1
|
person.setFirstName("first"); |
26 |
1
|
person.setLastName("last"); |
27 |
1
|
person.setEmail("first@test.com"); |
28 |
1
|
person.setType("STUDENT"); |
29 |
1
|
person.setState("CREATE"); |
30 |
1
|
person.setId("P1"); |
31 |
1
|
person.setGpa(3.5); |
32 |
1
|
ServerDateParser dp = new ServerDateParser(); |
33 |
1
|
person.setDob(dp.parseDate("1978-01-01")); |
34 |
|
|
35 |
|
|
36 |
1
|
return person; |
37 |
|
} |
38 |
|
|
39 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (23) |
Complexity: 1 |
Complexity Density: 0.04 |
|
40 |
1
|
public static ConstraintMockPerson buildTestPerson3() {... |
41 |
1
|
ConstraintMockPerson person = new ConstraintMockPerson(); |
42 |
|
|
43 |
1
|
person.setFirstName("first"); |
44 |
1
|
person.setLastName("last"); |
45 |
1
|
person.setEmail("first@test.com"); |
46 |
1
|
person.setType("STUDENT"); |
47 |
1
|
person.setState("CREATE"); |
48 |
1
|
person.setId("P1"); |
49 |
1
|
ServerDateParser dp = new ServerDateParser(); |
50 |
1
|
person.setDob(dp.parseDate("1978-01-01")); |
51 |
|
|
52 |
1
|
ConstraintMockAddress address = new ConstraintMockAddress(); |
53 |
1
|
address.setState("ACTIVE"); |
54 |
1
|
address.setType("MAILING"); |
55 |
1
|
address.setId("A1"); |
56 |
1
|
address.setCity("TLH"); |
57 |
1
|
address.setStateCode("FL"); |
58 |
1
|
address.setCountry("US"); |
59 |
1
|
address.setLine1(""); |
60 |
1
|
address.setLine2("line2value"); |
61 |
1
|
address.setPostalCode("32306"); |
62 |
|
|
63 |
1
|
List<ConstraintMockAddress> addressL = new ArrayList<ConstraintMockAddress>(); |
64 |
1
|
addressL.add(address); |
65 |
|
|
66 |
1
|
person.setAddress(addressL); |
67 |
|
|
68 |
1
|
return person; |
69 |
|
} |
70 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (23) |
Complexity: 1 |
Complexity Density: 0.04 |
|
71 |
1
|
public static ConstraintMockPerson buildTestPerson4() {... |
72 |
1
|
ConstraintMockPerson person = new ConstraintMockPerson(); |
73 |
|
|
74 |
1
|
person.setFirstName("first"); |
75 |
1
|
person.setLastName("last"); |
76 |
1
|
person.setEmail("first@test.com"); |
77 |
1
|
person.setType("STUDENT"); |
78 |
1
|
person.setState("CREATE"); |
79 |
1
|
person.setId("P1"); |
80 |
1
|
ServerDateParser dp = new ServerDateParser(); |
81 |
1
|
person.setDob(dp.parseDate("1978-01-01")); |
82 |
|
|
83 |
1
|
ConstraintMockAddress address = new ConstraintMockAddress(); |
84 |
1
|
address.setState("DRAFT"); |
85 |
1
|
address.setType("MAILING"); |
86 |
1
|
address.setId("A1"); |
87 |
1
|
address.setCity("TLH"); |
88 |
1
|
address.setStateCode(""); |
89 |
1
|
address.setCountry("CAN"); |
90 |
1
|
address.setLine1("linevalue"); |
91 |
1
|
address.setLine2("linevalue"); |
92 |
1
|
address.setPostalCode("56722"); |
93 |
|
|
94 |
1
|
List<ConstraintMockAddress> addressL = new ArrayList<ConstraintMockAddress>(); |
95 |
1
|
addressL.add(address); |
96 |
|
|
97 |
1
|
person.setAddress(addressL); |
98 |
|
|
99 |
1
|
return person; |
100 |
|
} |
101 |
|
} |