4
4
import static org .mockito .ArgumentMatchers .any ;
5
5
import static org .mockito .ArgumentMatchers .anyInt ;
6
6
import static org .mockito .Mockito .when ;
7
+ import static org .mockito .Mockito .withSettings ;
7
8
import java .util .List ;
8
9
import java .util .Random ;
9
10
import org .junit .Test ;
@@ -23,7 +24,7 @@ public class SinglePointCrossoverTest {
23
24
public void testNumberOfGeneratedVariants () {
24
25
25
26
// 生成するバリアントを制御するための疑似乱数
26
- final Random random = Mockito .mock (Random .class );
27
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
27
28
when (random .nextBoolean ()).thenReturn (true );
28
29
when (random .nextInt (anyInt ())).thenReturn (0 );
29
30
@@ -49,7 +50,7 @@ public void testNumberOfGeneratedVariants() {
49
50
public void testStopFirst01 () {
50
51
51
52
// 生成するバリアントを制御するための疑似乱数
52
- final Random random = Mockito .mock (Random .class );
53
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
53
54
when (random .nextBoolean ()).thenReturn (true );
54
55
when (random .nextInt (anyInt ())).thenReturn (0 );
55
56
@@ -73,7 +74,7 @@ public void testStopFirst01() {
73
74
public void testStopFirst02 () {
74
75
75
76
// 生成するバリアントを制御するための疑似乱数
76
- final Random random = Mockito .mock (Random .class );
77
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
77
78
when (random .nextBoolean ()).thenReturn (true );
78
79
when (random .nextInt (anyInt ())).thenReturn (0 );
79
80
@@ -102,7 +103,7 @@ public void testStopFirst02() {
102
103
public void testGeneratedVariants01 () {
103
104
104
105
// 生成するバリアントを制御するための疑似乱数
105
- final Random random = Mockito .mock (Random .class );
106
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
106
107
when (random .nextBoolean ()).thenReturn (true );
107
108
when (random .nextInt (anyInt ())).thenReturn (0 ) // variantAを選ぶための0
108
109
.thenReturn (0 ) // variantBを選ぶための0
@@ -132,7 +133,7 @@ public void testGeneratedVariants01() {
132
133
public void testGeneratedVariants02 () {
133
134
134
135
// 生成するバリアントを制御するための疑似乱数
135
- final Random random = Mockito .mock (Random .class );
136
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
136
137
when (random .nextBoolean ()).thenReturn (false );
137
138
when (random .nextInt (anyInt ())).thenReturn (2 ) // variantCを選ぶための2
138
139
.thenReturn (2 ) // variantDを選ぶための2
@@ -162,7 +163,7 @@ public void testGeneratedVariants02() {
162
163
public void testGeneratedVariants03 () {
163
164
164
165
// 生成するバリアントを制御するための疑似乱数
165
- final Random random = Mockito .mock (Random .class );
166
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
166
167
when (random .nextBoolean ()).thenReturn (true );
167
168
when (random .nextInt (anyInt ())).thenReturn (0 );
168
169
@@ -191,7 +192,7 @@ public void testGeneratedVariants03() {
191
192
public void testGeneratedVariants04 () {
192
193
193
194
// 生成するバリアントを制御するための疑似乱数
194
- final Random random = Mockito .mock (Random .class );
195
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
195
196
when (random .nextBoolean ()).thenReturn (false );
196
197
when (random .nextInt (anyInt ())).thenReturn (2 );
197
198
@@ -220,7 +221,7 @@ public void testGeneratedVariants04() {
220
221
public void testGeneratedVariants05 () {
221
222
222
223
// 生成するバリアントを制御するための疑似乱数
223
- final Random random = Mockito .mock (Random .class );
224
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
224
225
when (random .nextBoolean ()).thenReturn (true );
225
226
when (random .nextInt (anyInt ())).thenReturn (0 );
226
227
@@ -249,7 +250,7 @@ public void testGeneratedVariants05() {
249
250
public void testGeneratedVariants06 () {
250
251
251
252
// 生成するバリアントを制御するための疑似乱数
252
- final Random random = Mockito .mock (Random .class );
253
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
253
254
when (random .nextBoolean ()).thenReturn (false );
254
255
when (random .nextInt (anyInt ())).thenReturn (2 );
255
256
@@ -278,7 +279,7 @@ public void testGeneratedVariants06() {
278
279
public void testGeneratedVariants07 () {
279
280
280
281
// 生成するバリアントを制御するための疑似乱数
281
- final Random random = Mockito .mock (Random .class );
282
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
282
283
when (random .nextBoolean ()).thenReturn (true );
283
284
when (random .nextInt (anyInt ())).thenReturn (0 );
284
285
@@ -306,7 +307,7 @@ public void testGeneratedVariants07() {
306
307
public void testGeneratedVariants08 () {
307
308
308
309
// 生成するバリアントを制御するための疑似乱数
309
- final Random random = Mockito .mock (Random .class );
310
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
310
311
when (random .nextBoolean ()).thenReturn (true );
311
312
when (random .nextInt (anyInt ())).thenReturn (1 );
312
313
@@ -334,7 +335,7 @@ public void testGeneratedVariants08() {
334
335
public void testGeneratedVariants09 () {
335
336
336
337
// 生成するバリアントを制御するための疑似乱数
337
- final Random random = Mockito .mock (Random .class );
338
+ final Random random = Mockito .mock (Random .class , withSettings (). withoutAnnotations () );
338
339
when (random .nextBoolean ()).thenReturn (true );
339
340
when (random .nextInt (anyInt ())).thenReturn (1 );
340
341
0 commit comments