1 |
|
package org.kuali.student.common.validator; |
2 |
|
|
3 |
|
import java.util.ArrayList; |
4 |
|
import java.util.List; |
5 |
|
|
6 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (45) |
Complexity: 3 |
Complexity Density: 0.07 |
|
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 |
|
} |