change assertTrue (instanceof) -> assertInstanceOf

This commit is contained in:
jojoldu
2024-08-24 23:55:58 +09:00
committed by Mahmoud Ben Hassine
parent 5a62de9031
commit 7d151234b1
2 changed files with 9 additions and 4 deletions

View File

@@ -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 org.springframework.util.StringUtils;
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 @@ class FaultTolerantStepFactoryBeanRetryTests {
@SuppressWarnings("cast")
@Test
void testDefaultValue() throws Exception {
assertTrue(factory.getObject() instanceof Step);
assertInstanceOf(Step.class, factory.getObject());
}
@Test

View File

@@ -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 org.springframework.batch.support.transaction.ResourcelessTransactionMana
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 @@ class RepeatOperationsStepFactoryBeanTests {
@Test
@SuppressWarnings("cast")
void testDefaultValue() throws Exception {
assertTrue(factory.getObject() instanceof Step);
assertInstanceOf(Step.class, factory.getObject());
}
@Test