Skip to content

Commit 0bb8671

Browse files
committed
Replace Assert.assertThat with MatcherAssert.assertThat
Assert.assertThat is deprecated with MatcherAssert.assertThat as the replacement.
1 parent 3fbfbb9 commit 0bb8671

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2014 the original author or authors.
2+
* Copyright 2009-2020 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.
@@ -53,9 +53,9 @@
5353
import org.springframework.util.StringUtils;
5454

5555
import static org.hamcrest.CoreMatchers.instanceOf;
56+
import static org.hamcrest.MatcherAssert.assertThat;
5657
import static org.junit.Assert.assertEquals;
5758
import static org.junit.Assert.assertFalse;
58-
import static org.junit.Assert.assertThat;
5959
import static org.junit.Assert.assertTrue;
6060
import static org.springframework.batch.core.BatchStatus.FAILED;
6161

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/file/FlatFileItemReaderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616
package org.springframework.batch.item.file;
1717

18+
import static org.hamcrest.MatcherAssert.assertThat;
1819
import static org.hamcrest.Matchers.endsWith;
1920
import static org.hamcrest.Matchers.startsWith;
2021
import static org.junit.Assert.assertEquals;
2122
import static org.junit.Assert.assertNotNull;
2223
import static org.junit.Assert.assertNull;
23-
import static org.junit.Assert.assertThat;
2424
import static org.junit.Assert.assertTrue;
2525
import static org.junit.Assert.fail;
2626

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/kafka/KafkaItemReaderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
import org.springframework.kafka.test.utils.KafkaTestUtils;
4444
import org.springframework.util.concurrent.ListenableFuture;
4545

46+
import static org.hamcrest.MatcherAssert.assertThat;
4647
import static org.hamcrest.Matchers.containsInAnyOrder;
4748
import static org.hamcrest.Matchers.is;
4849
import static org.junit.Assert.assertEquals;
4950
import static org.junit.Assert.assertNull;
50-
import static org.junit.Assert.assertThat;
5151
import static org.junit.Assert.fail;
5252

5353
/**

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/AbstractStaxEventWriterItemWriterTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -43,7 +43,7 @@
4343
import org.springframework.util.ClassUtils;
4444
import org.springframework.util.StopWatch;
4545

46-
import static org.junit.Assert.assertThat;
46+
import static org.hamcrest.MatcherAssert.assertThat;
4747

4848
public abstract class AbstractStaxEventWriterItemWriterTests {
4949

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/Jaxb2NamespaceMarshallingTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2019 the original author or authors.
2+
* Copyright 2010-2020 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.
@@ -44,7 +44,7 @@
4444
import org.springframework.util.ClassUtils;
4545
import org.springframework.util.StopWatch;
4646

47-
import static org.junit.Assert.assertThat;
47+
import static org.hamcrest.MatcherAssert.assertThat;
4848
import static org.junit.Assert.assertTrue;
4949

5050
public class Jaxb2NamespaceMarshallingTests {

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/xml/StaxEventItemReaderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616
package org.springframework.batch.item.xml;
1717

18+
import org.hamcrest.MatcherAssert;
1819
import org.hamcrest.Matchers;
19-
import org.junit.Assert;
2020
import org.junit.Before;
2121
import org.junit.Test;
2222
import org.springframework.batch.item.ExecutionContext;
@@ -634,7 +634,7 @@ public Object unmarshal(Source source) throws XmlMappingException {
634634
reader.read();
635635
fail("Should fail when XML contains DTD");
636636
} catch (Exception e) {
637-
Assert.assertThat(e.getMessage(), Matchers.containsString("Undeclared general entity \"entityex\""));
637+
MatcherAssert.assertThat(e.getMessage(), Matchers.containsString("Undeclared general entity \"entityex\""));
638638
}
639639
}
640640

0 commit comments

Comments
 (0)