17
17
*/
18
18
package ru.mystamps.web.feature.site
19
19
20
+ import org.assertj.core.api.WithAssertions
20
21
import org.slf4j.helpers.NOPLogger
21
22
import ru.mystamps.web.feature.account.UserService
22
23
import ru.mystamps.web.feature.account.UsersActivationFullDto
@@ -30,7 +31,7 @@ import ru.mystamps.web.service.TestObjects
30
31
import spock.lang.Specification
31
32
32
33
@SuppressWarnings ([' ClassJavadoc' , ' MethodName' , ' NoDef' , ' NoTabCharacter' , ' TrailingWhitespace' ])
33
- class LegacyCronServiceImplTest extends Specification {
34
+ class LegacyCronServiceImplTest extends Specification implements WithAssertions {
34
35
35
36
private final CategoryService categoryService = Mock ()
36
37
private final CountryService countryService = Mock ()
@@ -66,14 +67,14 @@ class LegacyCronServiceImplTest extends Specification {
66
67
assert first[Calendar . DAY_OF_MONTH ] == second[Calendar . DAY_OF_MONTH ]
67
68
}
68
69
69
- private static void assertMidnightOfYesterday (Date date ) {
70
- assert date != null
70
+ private void assertMidnightOfYesterday (Date date ) {
71
+ assertThat ( date) . isNotNull()
71
72
assertDatesEqual(date, new Date (). previous())
72
73
assertMidnight(date)
73
74
}
74
75
75
- private static void assertMidnightOfToday (Date date ) {
76
- assert date != null
76
+ private void assertMidnightOfToday (Date date ) {
77
+ assertThat ( date) . isNotNull()
77
78
assertDatesEqual(date, new Date ())
78
79
assertMidnight(date)
79
80
}
0 commit comments