File tree Expand file tree Collapse file tree 4 files changed +19
-18
lines changed
3-0-spring-framework/3-0-0-hello-spring-framework/src/test/java/com/bobocode
java-web-exercises-util/spring-framework-exercises-util
src/main/java/com/bobocode Expand file tree Collapse file tree 4 files changed +19
-18
lines changed Original file line number Diff line number Diff line change 1
1
package com .bobocode ;
2
2
3
+ import static org .assertj .core .api .Assertions .assertThat ;
4
+
3
5
import com .bobocode .dao .AccountDao ;
4
- import com .bobocode .dao .FakeAccountDao ;
5
6
import com .bobocode .service .AccountService ;
6
- import org .junit .jupiter .api .*;
7
+ import java .util .Map ;
8
+ import org .junit .jupiter .api .DisplayName ;
9
+ import org .junit .jupiter .api .MethodOrderer ;
10
+ import org .junit .jupiter .api .Order ;
11
+ import org .junit .jupiter .api .Test ;
12
+ import org .junit .jupiter .api .TestMethodOrder ;
7
13
import org .springframework .beans .factory .annotation .Autowired ;
8
14
import org .springframework .context .ApplicationContext ;
9
15
import org .springframework .context .annotation .ComponentScan ;
10
16
import org .springframework .context .annotation .Configuration ;
11
17
import org .springframework .test .context .junit .jupiter .SpringJUnitConfig ;
12
18
13
- import java .util .Map ;
14
-
15
- import static org .assertj .core .api .Assertions .assertThat ;
16
- import static org .junit .jupiter .api .Assertions .assertNotNull ;
17
-
18
19
@ SpringJUnitConfig
19
20
@ TestMethodOrder (MethodOrderer .OrderAnnotation .class )
20
21
class ApplicationContextTest {
Original file line number Diff line number Diff line change 19
19
<version >1.0-SNAPSHOT</version >
20
20
</dependency >
21
21
<dependency >
22
- <groupId >io.codearte.jfairy </groupId >
22
+ <groupId >com.devskiller </groupId >
23
23
<artifactId >jfairy</artifactId >
24
- <version >0.5.7 </version >
24
+ <version >0.6.5 </version >
25
25
</dependency >
26
26
</dependencies >
27
27
</project >
Original file line number Diff line number Diff line change 2
2
3
3
import com .bobocode .model .Account ;
4
4
import com .bobocode .model .Gender ;
5
- import io .codearte .jfairy .Fairy ;
6
- import io .codearte .jfairy .producer .person .Person ;
7
-
5
+ import com .devskiller .jfairy .Fairy ;
6
+ import com .devskiller .jfairy .producer .person .Person ;
8
7
import java .math .BigDecimal ;
9
8
import java .time .LocalDate ;
10
9
import java .time .LocalDateTime ;
11
10
import java .util .concurrent .ThreadLocalRandom ;
12
11
13
12
public class TestDataGenerator {
13
+
14
14
public Account generateAccount () {
15
15
Fairy fairy = Fairy .create ();
16
16
Person person = fairy .person ();
@@ -30,7 +30,7 @@ private Account convertToAccount(Person person) {
30
30
account .setEmail (person .getEmail ());
31
31
account .setBirthday (LocalDate .of (
32
32
person .getDateOfBirth ().getYear (),
33
- person .getDateOfBirth ().getMonthOfYear (),
33
+ person .getDateOfBirth ().getMonth (),
34
34
person .getDateOfBirth ().getDayOfMonth ()));
35
35
account .setGender (Gender .valueOf (person .getSex ().name ()));
36
36
return account ;
Original file line number Diff line number Diff line change 34
34
<dependency >
35
35
<groupId >org.slf4j</groupId >
36
36
<artifactId >slf4j-simple</artifactId >
37
- <version >1.7.24 </version >
37
+ <version >1.7.36 </version >
38
38
</dependency >
39
39
<dependency >
40
40
<groupId >org.junit.jupiter</groupId >
51
51
<dependency >
52
52
<groupId >org.assertj</groupId >
53
53
<artifactId >assertj-core</artifactId >
54
- <version >3.18 .1</version >
54
+ <version >3.23 .1</version >
55
55
<scope >test</scope >
56
56
</dependency >
57
57
<dependency >
58
58
<groupId >org.reflections</groupId >
59
59
<artifactId >reflections</artifactId >
60
- <version >0.9.12 </version >
60
+ <version >0.10.2 </version >
61
61
</dependency >
62
62
<dependency >
63
63
<groupId >org.hamcrest</groupId >
73
73
<dependency >
74
74
<groupId >org.mockito</groupId >
75
75
<artifactId >mockito-core</artifactId >
76
- <version >3.8.0 </version >
76
+ <version >4.6.1 </version >
77
77
<scope >test</scope >
78
78
</dependency >
79
79
<dependency >
80
80
<groupId >org.mockito</groupId >
81
81
<artifactId >mockito-junit-jupiter</artifactId >
82
- <version >3.8.0 </version >
82
+ <version >4.6.1 </version >
83
83
<scope >test</scope >
84
84
</dependency >
85
85
</dependencies >
You can’t perform that action at this time.
0 commit comments