Skip to content

Commit 7d15123

Browse files
jojoldufmbenhassine
authored andcommitted
change assertTrue (instanceof) -> assertInstanceOf
1 parent 5a62de9 commit 7d15123

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2023 the original author or authors.
2+
* Copyright 2006-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -61,10 +61,12 @@
6161

6262
import static org.junit.jupiter.api.Assertions.assertEquals;
6363
import static org.junit.jupiter.api.Assertions.assertTrue;
64+
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
6465

6566
/**
6667
* @author Dave Syer
6768
* @author Mahmoud Ben Hassine
69+
* @author jojoldu
6870
*
6971
*/
7072
class FaultTolerantStepFactoryBeanRetryTests {
@@ -134,7 +136,7 @@ void testType() {
134136
@SuppressWarnings("cast")
135137
@Test
136138
void testDefaultValue() throws Exception {
137-
assertTrue(factory.getObject() instanceof Step);
139+
assertInstanceOf(Step.class, factory.getObject());
138140
}
139141

140142
@Test

spring-batch-core/src/test/java/org/springframework/batch/core/step/item/RepeatOperationsStepFactoryBeanTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2023 the original author or authors.
2+
* Copyright 2006-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,10 +35,13 @@
3535

3636
import static org.junit.jupiter.api.Assertions.assertEquals;
3737
import static org.junit.jupiter.api.Assertions.assertTrue;
38+
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
39+
3840

3941
/**
4042
* @author Dave Syer
4143
* @author Mahmoud Ben Hassine
44+
* @author jojoldu
4245
*
4346
*/
4447
class RepeatOperationsStepFactoryBeanTests {
@@ -66,7 +69,7 @@ void testType() {
6669
@Test
6770
@SuppressWarnings("cast")
6871
void testDefaultValue() throws Exception {
69-
assertTrue(factory.getObject() instanceof Step);
72+
assertInstanceOf(Step.class, factory.getObject());
7073
}
7174

7275
@Test

0 commit comments

Comments
 (0)