@@ -52,7 +52,7 @@ public void type() {
52
52
RandomService service = context .getBean (RandomService .class );
53
53
service .service ();
54
54
List <Long > periods = context .getBean (PeriodSleeper .class ).getPeriods ();
55
- assertThat (periods .get (0 ) > 1000 ).describedAs ("Wrong periods: %s" + periods . toString ()). isTrue ( );
55
+ assertThat (periods .get (0 )).describedAs ("Wrong periods: %s" + periods ). isGreaterThan ( 1000 );
56
56
assertThat (service .getCount ()).isEqualTo (3 );
57
57
context .close ();
58
58
}
@@ -76,9 +76,7 @@ public void randomExponential() {
76
76
List <Long > periods = context .getBean (PeriodSleeper .class ).getPeriods ();
77
77
assertThat (context .getBean (PeriodSleeper .class ).getPeriods ().toString ()).isNotEqualTo ("[1000, 1100]" );
78
78
assertThat (periods .get (0 )).describedAs ("Wrong periods: %s" + periods ).isGreaterThanOrEqualTo (1000 );
79
- assertThat (periods .get (1 )).describedAs ("Wrong periods: %s" + periods )
80
- .isGreaterThanOrEqualTo (1100 )
81
- .isLessThanOrEqualTo (1210 );
79
+ assertThat (periods .get (1 )).describedAs ("Wrong periods: %s" + periods ).isBetween (1100L , 1210L );
82
80
context .close ();
83
81
}
84
82
@@ -90,9 +88,8 @@ public void randomExponentialExpression() {
90
88
assertThat (service .getCount ()).isEqualTo (3 );
91
89
List <Long > periods = context .getBean (PeriodSleeper .class ).getPeriods ();
92
90
assertThat (context .getBean (PeriodSleeper .class ).getPeriods ().toString ()).isNotEqualTo ("[1000, 1100]" );
93
- assertThat (periods .get (0 ) > 1000 ).describedAs ("Wrong periods: %s" + periods .toString ()).isTrue ();
94
- assertThat (periods .get (1 ) > 1100 && periods .get (1 ) < 1210 ).describedAs ("Wrong periods: %s" + periods .toString ())
95
- .isTrue ();
91
+ assertThat (periods .get (0 )).describedAs ("Wrong periods: %s" + periods ).isGreaterThanOrEqualTo (1000 );
92
+ assertThat (periods .get (1 )).describedAs ("Wrong periods: %s" + periods ).isBetween (1100L , 1210L );
96
93
context .close ();
97
94
}
98
95
@@ -102,7 +99,7 @@ public void randomExponentialExpression() {
102
99
protected static class TestConfiguration {
103
100
104
101
@ Bean
105
- public PeriodSleeper sleper () {
102
+ public PeriodSleeper sleeper () {
106
103
return new PeriodSleeper ();
107
104
}
108
105
0 commit comments