8
8
9
9
import java .math .BigDecimal ;
10
10
import java .time .LocalDate ;
11
+ import java .time .LocalDateTime ;
11
12
import java .util .ArrayList ;
12
13
import java .util .List ;
13
14
import java .util .Random ;
@@ -17,17 +18,17 @@ public class TestDataProvider {
17
18
public static List <Account > generateAccountList () {
18
19
List <Account > accounts = new ArrayList <>(6 );
19
20
accounts .
add (
new Account (
1L ,
"Will" ,
"Smith" ,
"[email protected] " ,
20
- LocalDate .of (1968 , 8 , 25 ), LocalDate . of ( 2012 , 3 , 19 ), BigDecimal .valueOf (104065.25 )));
21
+ LocalDate .of (1968 , 8 , 25 ), LocalDateTime . now ( ), BigDecimal .valueOf (104065.25 )));
21
22
accounts .
add (
new Account (
2L ,
"Tom" ,
"Hanks" ,
"[email protected] " ,
22
- LocalDate .of (1956 , 7 , 9 ), LocalDate . of ( 2013 , 2 , 23 ), BigDecimal .valueOf (93065.25 )));
23
+ LocalDate .of (1956 , 7 , 9 ), LocalDateTime . now ( ), BigDecimal .valueOf (93065.25 )));
23
24
accounts .
add (
new Account (
3L ,
"Russell" ,
"Crowe" ,
"[email protected] " ,
24
- LocalDate .of (1964 , 4 , 7 ), LocalDate . of ( 2014 , 5 , 17 ), BigDecimal .valueOf (87641.98 )));
25
+ LocalDate .of (1964 , 4 , 7 ), LocalDateTime . now ( ), BigDecimal .valueOf (87641.98 )));
25
26
accounts .
add (
new Account (
4L ,
"Robert" ,
"Downey" ,
"[email protected] " ,
26
- LocalDate .of (1965 , 4 , 9 ), LocalDate . of ( 2015 , 7 , 24 ), BigDecimal .valueOf (152345 )));
27
+ LocalDate .of (1965 , 4 , 9 ), LocalDateTime . now ( ), BigDecimal .valueOf (152345 )));
27
28
accounts .
add (
new Account (
5L ,
"Robert" ,
"De Niro" ,
"[email protected] " ,
28
- LocalDate .of (1943 , 8 , 17 ), LocalDate . of ( 2010 , 8 , 14 ), BigDecimal .valueOf (67065.45 )));
29
+ LocalDate .of (1943 , 8 , 17 ), LocalDateTime . now ( ), BigDecimal .valueOf (67065.45 )));
29
30
accounts .
add (
new Account (
6L ,
"Metthew" ,
"Perry" ,
"[email protected] " ,
30
- LocalDate .of (1969 , 8 , 19 ), LocalDate . of ( 2011 , 10 , 4 ), BigDecimal .valueOf (45678.12 )));
31
+ LocalDate .of (1969 , 8 , 19 ), LocalDateTime . now ( ), BigDecimal .valueOf (45678.12 )));
31
32
return accounts ;
32
33
}
33
34
@@ -39,14 +40,14 @@ public static Account generateFakeAccount(){
39
40
40
41
Account fakeAccount = new Account ();
41
42
fakeAccount .setFirstName (person .getFirstName ());
42
- fakeAccount .setLastName (person .getFirstName ());
43
+ fakeAccount .setLastName (person .getLastName ());
43
44
fakeAccount .setEmail (person .getEmail ());
44
45
fakeAccount .setBirthday (LocalDate .of (
45
46
person .getDateOfBirth ().getYear (),
46
47
person .getDateOfBirth ().getMonthOfYear (),
47
48
person .getDateOfBirth ().getDayOfMonth ()));
48
49
fakeAccount .setBalance (BigDecimal .valueOf (random .nextInt (200_000 )));
49
- fakeAccount .setCreationDate (LocalDate .now ());
50
+ fakeAccount .setCreationDate (LocalDateTime .now ());
50
51
51
52
return fakeAccount ;
52
53
}
0 commit comments