1 package org.kuali.student.common.validator; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 7 public class ValidatorMockObjectGenerator { 8 public static ConstraintMockPerson buildTestPerson1() { 9 ConstraintMockPerson person = new ConstraintMockPerson(); 10 11 person.setFirstName("first"); 12 person.setLastName("last"); 13 person.setEmail("first@test.com"); 14 person.setType("STUDENT"); 15 person.setState("CREATE"); 16 person.setId("P1"); 17 18 return person; 19 } 20 21 22 public static ConstraintMockPerson buildTestPerson2() { 23 ConstraintMockPerson person = new ConstraintMockPerson(); 24 25 person.setFirstName("first"); 26 person.setLastName("last"); 27 person.setEmail("first@test.com"); 28 person.setType("STUDENT"); 29 person.setState("CREATE"); 30 person.setId("P1"); 31 person.setGpa(3.5); 32 ServerDateParser dp = new ServerDateParser(); 33 person.setDob(dp.parseDate("1978-01-01")); 34 35 36 return person; 37 } 38 39 40 public static ConstraintMockPerson buildTestPerson3() { 41 ConstraintMockPerson person = new ConstraintMockPerson(); 42 43 person.setFirstName("first"); 44 person.setLastName("last"); 45 person.setEmail("first@test.com"); 46 person.setType("STUDENT"); 47 person.setState("CREATE"); 48 person.setId("P1"); 49 ServerDateParser dp = new ServerDateParser(); 50 person.setDob(dp.parseDate("1978-01-01")); 51 52 ConstraintMockAddress address = new ConstraintMockAddress(); 53 address.setState("ACTIVE"); 54 address.setType("MAILING"); 55 address.setId("A1"); 56 address.setCity("TLH"); 57 address.setStateCode("FL"); 58 address.setCountry("US"); 59 address.setLine1(""); 60 address.setLine2("line2value"); 61 address.setPostalCode("32306"); 62 63 List<ConstraintMockAddress> addressL = new ArrayList<ConstraintMockAddress>(); 64 addressL.add(address); 65 66 person.setAddress(addressL); 67 68 return person; 69 } 70 }