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 11package com .bobocode ;
22
3+ import static org .assertj .core .api .Assertions .assertThat ;
4+
35import com .bobocode .dao .AccountDao ;
4- import com .bobocode .dao .FakeAccountDao ;
56import 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 ;
713import org .springframework .beans .factory .annotation .Autowired ;
814import org .springframework .context .ApplicationContext ;
915import org .springframework .context .annotation .ComponentScan ;
1016import org .springframework .context .annotation .Configuration ;
1117import org .springframework .test .context .junit .jupiter .SpringJUnitConfig ;
1218
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-
1819@ SpringJUnitConfig
1920@ TestMethodOrder (MethodOrderer .OrderAnnotation .class )
2021class ApplicationContextTest {
Original file line number Diff line number Diff line change 1919 <version >1.0-SNAPSHOT</version >
2020 </dependency >
2121 <dependency >
22- <groupId >io.codearte.jfairy </groupId >
22+ <groupId >com.devskiller </groupId >
2323 <artifactId >jfairy</artifactId >
24- <version >0.5.7 </version >
24+ <version >0.6.5 </version >
2525 </dependency >
2626 </dependencies >
2727</project >
Original file line number Diff line number Diff line change 22
33import com .bobocode .model .Account ;
44import 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 ;
87import java .math .BigDecimal ;
98import java .time .LocalDate ;
109import java .time .LocalDateTime ;
1110import java .util .concurrent .ThreadLocalRandom ;
1211
1312public class TestDataGenerator {
13+
1414 public Account generateAccount () {
1515 Fairy fairy = Fairy .create ();
1616 Person person = fairy .person ();
@@ -30,7 +30,7 @@ private Account convertToAccount(Person person) {
3030 account .setEmail (person .getEmail ());
3131 account .setBirthday (LocalDate .of (
3232 person .getDateOfBirth ().getYear (),
33- person .getDateOfBirth ().getMonthOfYear (),
33+ person .getDateOfBirth ().getMonth (),
3434 person .getDateOfBirth ().getDayOfMonth ()));
3535 account .setGender (Gender .valueOf (person .getSex ().name ()));
3636 return account ;
Original file line number Diff line number Diff line change 3434 <dependency >
3535 <groupId >org.slf4j</groupId >
3636 <artifactId >slf4j-simple</artifactId >
37- <version >1.7.24 </version >
37+ <version >1.7.36 </version >
3838 </dependency >
3939 <dependency >
4040 <groupId >org.junit.jupiter</groupId >
5151 <dependency >
5252 <groupId >org.assertj</groupId >
5353 <artifactId >assertj-core</artifactId >
54- <version >3.18 .1</version >
54+ <version >3.23 .1</version >
5555 <scope >test</scope >
5656 </dependency >
5757 <dependency >
5858 <groupId >org.reflections</groupId >
5959 <artifactId >reflections</artifactId >
60- <version >0.9.12 </version >
60+ <version >0.10.2 </version >
6161 </dependency >
6262 <dependency >
6363 <groupId >org.hamcrest</groupId >
7373 <dependency >
7474 <groupId >org.mockito</groupId >
7575 <artifactId >mockito-core</artifactId >
76- <version >3.8.0 </version >
76+ <version >4.6.1 </version >
7777 <scope >test</scope >
7878 </dependency >
7979 <dependency >
8080 <groupId >org.mockito</groupId >
8181 <artifactId >mockito-junit-jupiter</artifactId >
82- <version >3.8.0 </version >
82+ <version >4.6.1 </version >
8383 <scope >test</scope >
8484 </dependency >
8585 </dependencies >
You can’t perform that action at this time.
0 commit comments