32
32
* @author Mark Fisher
33
33
* @since 3.0
34
34
*/
35
- public class PeriodicTriggerTests {
35
+ class PeriodicTriggerTests {
36
36
37
37
@ Test
38
- public void fixedDelayFirstExecution () {
38
+ void fixedDelayFirstExecution () {
39
39
Instant now = Instant .now ();
40
40
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofMillis (5000 ));
41
41
Instant next = trigger .nextExecution (context (null , null , null ));
42
42
assertNegligibleDifference (now , next );
43
43
}
44
44
45
45
@ Test
46
- public void fixedDelayWithInitialDelayFirstExecution () {
47
46
@ SuppressWarnings ("deprecation" )
47
+ void fixedDelayWithInitialDelayFirstExecution () {
48
48
Instant now = Instant .now ();
49
49
long period = 5000 ;
50
50
long initialDelay = 30000 ;
@@ -55,15 +55,15 @@ public void fixedDelayWithInitialDelayFirstExecution() {
55
55
}
56
56
57
57
@ Test
58
- public void fixedDelayWithTimeUnitFirstExecution () {
58
+ void fixedDelayWithTimeUnitFirstExecution () {
59
59
Instant now = Instant .now ();
60
60
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofSeconds (5 ));
61
61
Instant next = trigger .nextExecution (context (null , null , null ));
62
62
assertNegligibleDifference (now , next );
63
63
}
64
64
65
65
@ Test
66
- public void fixedDelayWithTimeUnitAndInitialDelayFirstExecution () {
66
+ void fixedDelayWithTimeUnitAndInitialDelayFirstExecution () {
67
67
Instant now = Instant .now ();
68
68
long period = 5 ;
69
69
long initialDelay = 30 ;
@@ -74,7 +74,7 @@ public void fixedDelayWithTimeUnitAndInitialDelayFirstExecution() {
74
74
}
75
75
76
76
@ Test
77
- public void fixedDelaySubsequentExecution () {
77
+ void fixedDelaySubsequentExecution () {
78
78
Instant now = Instant .now ();
79
79
long period = 5000 ;
80
80
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofMillis (period ));
@@ -83,8 +83,8 @@ public void fixedDelaySubsequentExecution() {
83
83
}
84
84
85
85
@ Test
86
- public void fixedDelayWithInitialDelaySubsequentExecution () {
87
86
@ SuppressWarnings ("deprecation" )
87
+ void fixedDelayWithInitialDelaySubsequentExecution () {
88
88
Instant now = Instant .now ();
89
89
long period = 5000 ;
90
90
long initialDelay = 30000 ;
@@ -95,7 +95,7 @@ public void fixedDelayWithInitialDelaySubsequentExecution() {
95
95
}
96
96
97
97
@ Test
98
- public void fixedDelayWithTimeUnitSubsequentExecution () {
98
+ void fixedDelayWithTimeUnitSubsequentExecution () {
99
99
Instant now = Instant .now ();
100
100
long period = 5 ;
101
101
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofSeconds (period ));
@@ -104,7 +104,7 @@ public void fixedDelayWithTimeUnitSubsequentExecution() {
104
104
}
105
105
106
106
@ Test
107
- public void fixedRateFirstExecution () {
107
+ void fixedRateFirstExecution () {
108
108
Instant now = Instant .now ();
109
109
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofMillis (5000 ));
110
110
trigger .setFixedRate (true );
@@ -113,7 +113,7 @@ public void fixedRateFirstExecution() {
113
113
}
114
114
115
115
@ Test
116
- public void fixedRateWithTimeUnitFirstExecution () {
116
+ void fixedRateWithTimeUnitFirstExecution () {
117
117
Instant now = Instant .now ();
118
118
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofSeconds (5 ));
119
119
trigger .setFixedRate (true );
@@ -122,8 +122,8 @@ public void fixedRateWithTimeUnitFirstExecution() {
122
122
}
123
123
124
124
@ Test
125
- public void fixedRateWithInitialDelayFirstExecution () {
126
125
@ SuppressWarnings ("deprecation" )
126
+ void fixedRateWithInitialDelayFirstExecution () {
127
127
Instant now = Instant .now ();
128
128
long period = 5000 ;
129
129
long initialDelay = 30000 ;
@@ -135,7 +135,7 @@ public void fixedRateWithInitialDelayFirstExecution() {
135
135
}
136
136
137
137
@ Test
138
- public void fixedRateWithTimeUnitAndInitialDelayFirstExecution () {
138
+ void fixedRateWithTimeUnitAndInitialDelayFirstExecution () {
139
139
Instant now = Instant .now ();
140
140
long period = 5 ;
141
141
long initialDelay = 30 ;
@@ -147,7 +147,7 @@ public void fixedRateWithTimeUnitAndInitialDelayFirstExecution() {
147
147
}
148
148
149
149
@ Test
150
- public void fixedRateSubsequentExecution () {
150
+ void fixedRateSubsequentExecution () {
151
151
Instant now = Instant .now ();
152
152
long period = 5000 ;
153
153
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofMillis (period ));
@@ -157,8 +157,8 @@ public void fixedRateSubsequentExecution() {
157
157
}
158
158
159
159
@ Test
160
- public void fixedRateWithInitialDelaySubsequentExecution () {
161
160
@ SuppressWarnings ("deprecation" )
161
+ void fixedRateWithInitialDelaySubsequentExecution () {
162
162
Instant now = Instant .now ();
163
163
long period = 5000 ;
164
164
long initialDelay = 30000 ;
@@ -170,7 +170,7 @@ public void fixedRateWithInitialDelaySubsequentExecution() {
170
170
}
171
171
172
172
@ Test
173
- public void fixedRateWithTimeUnitSubsequentExecution () {
173
+ void fixedRateWithTimeUnitSubsequentExecution () {
174
174
Instant now = Instant .now ();
175
175
long period = 5 ;
176
176
PeriodicTrigger trigger = new PeriodicTrigger (Duration .ofHours (period ));
@@ -180,8 +180,8 @@ public void fixedRateWithTimeUnitSubsequentExecution() {
180
180
}
181
181
182
182
@ Test
183
- public void equalsVerification () {
184
183
@ SuppressWarnings ("deprecation" )
184
+ void equalsVerification () {
185
185
PeriodicTrigger trigger1 = new PeriodicTrigger (Duration .ofMillis (3000 ));
186
186
PeriodicTrigger trigger2 = new PeriodicTrigger (Duration .ofMillis (3000 ));
187
187
assertThat (trigger1 .equals (new String ("not a trigger" ))).isFalse ();
0 commit comments