From 8f7f37b03b816d32eac264850ed324f51447441a Mon Sep 17 00:00:00 2001 From: jojoldu Date: Sat, 24 Aug 2024 23:55:58 +0900 Subject: [PATCH] change assertTrue (instanceof) -> assertInstanceOf --- .../step/item/FaultTolerantStepFactoryBeanRetryTests.java | 6 ++++-- .../step/item/RepeatOperationsStepFactoryBeanTests.java | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java index 84cb8a0449..1c755304fe 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2023 the original author or authors. + * Copyright 2006-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,10 +61,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; /** * @author Dave Syer * @author Mahmoud Ben Hassine + * @author jojoldu * */ class FaultTolerantStepFactoryBeanRetryTests { @@ -134,7 +136,7 @@ void testType() { @SuppressWarnings("cast") @Test void testDefaultValue() throws Exception { - assertTrue(factory.getObject() instanceof Step); + assertInstanceOf(Step.class, factory.getObject()); } @Test diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/RepeatOperationsStepFactoryBeanTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/RepeatOperationsStepFactoryBeanTests.java index 88c2982aa3..7f5965dd4e 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/RepeatOperationsStepFactoryBeanTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/RepeatOperationsStepFactoryBeanTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2023 the original author or authors. + * Copyright 2006-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,10 +35,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; + /** * @author Dave Syer * @author Mahmoud Ben Hassine + * @author jojoldu * */ class RepeatOperationsStepFactoryBeanTests { @@ -66,7 +69,7 @@ void testType() { @Test @SuppressWarnings("cast") void testDefaultValue() throws Exception { - assertTrue(factory.getObject() instanceof Step); + assertInstanceOf(Step.class, factory.getObject()); } @Test