Skip to content

Commit

Permalink
Replace Assert.assertThat with MatcherAssert.assertThat
Browse files Browse the repository at this point in the history
Assert.assertThat is deprecated with MatcherAssert.assertThat as the
replacement.
  • Loading branch information
marschall committed Mar 13, 2021
1 parent 3fbfbb9 commit 0bb8671
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2014 the original author or authors.
* Copyright 2009-2020 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.
Expand Down Expand Up @@ -53,9 +53,9 @@
import org.springframework.util.StringUtils;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.springframework.batch.core.BatchStatus.FAILED;

Expand Down
Expand Up @@ -15,12 +15,12 @@
*/
package org.springframework.batch.item.file;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

Expand Down
Expand Up @@ -43,11 +43,11 @@
import org.springframework.kafka.test.utils.KafkaTestUtils;
import org.springframework.util.concurrent.ListenableFuture;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2019 the original author or authors.
* Copyright 2010-2020 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.
Expand Down Expand Up @@ -43,7 +43,7 @@
import org.springframework.util.ClassUtils;
import org.springframework.util.StopWatch;

import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;

public abstract class AbstractStaxEventWriterItemWriterTests {

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2019 the original author or authors.
* Copyright 2010-2020 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.
Expand Down Expand Up @@ -44,7 +44,7 @@
import org.springframework.util.ClassUtils;
import org.springframework.util.StopWatch;

import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertTrue;

public class Jaxb2NamespaceMarshallingTests {
Expand Down
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.batch.item.xml;

import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.batch.item.ExecutionContext;
Expand Down Expand Up @@ -634,7 +634,7 @@ public Object unmarshal(Source source) throws XmlMappingException {
reader.read();
fail("Should fail when XML contains DTD");
} catch (Exception e) {
Assert.assertThat(e.getMessage(), Matchers.containsString("Undeclared general entity \"entityex\""));
MatcherAssert.assertThat(e.getMessage(), Matchers.containsString("Undeclared general entity \"entityex\""));
}
}

Expand Down

0 comments on commit 0bb8671

Please sign in to comment.