From 5743a77a25936a31555852ec79a916e9b019e909 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Mon, 20 Jan 2020 12:21:27 +0100 Subject: [PATCH] Migrate deprecated assertThat() This utility is on its way to Hamcrest, migrate it. Change-Id: Ie1f6fd928096aad59790d5fb53ac71da620def79 Signed-off-by: Robert Varga --- .../org/opendaylight/protocol/bgp/parser/impl/ParserTest.java | 2 +- .../protocol/bgp/util/BGPBinaryFileParserTest.java | 2 +- .../opendaylight/protocol/bgp/util/BGPHexFileParserTest.java | 2 +- .../java/org/opendaylight/protocol/concepts/ASNumberTest.java | 3 +-- .../java/org/opendaylight/protocol/concepts/BandwidthTest.java | 3 +-- .../java/org/opendaylight/protocol/pcep/impl/UtilTest.java | 2 +- .../org/opendaylight/protocol/util/PCEPHexDumpParserTest.java | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/ParserTest.java b/bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/ParserTest.java index 4a41ac204a..f1f5350fe8 100644 --- a/bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/ParserTest.java +++ b/bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/ParserTest.java @@ -8,10 +8,10 @@ package org.opendaylight.protocol.bgp.parser.impl; import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPBinaryFileParserTest.java b/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPBinaryFileParserTest.java index 97b8729080..6b8105d1d7 100644 --- a/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPBinaryFileParserTest.java +++ b/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPBinaryFileParserTest.java @@ -7,9 +7,9 @@ */ package org.opendaylight.protocol.bgp.util; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPHexFileParserTest.java b/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPHexFileParserTest.java index 1a27de1b86..04dcda30be 100644 --- a/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPHexFileParserTest.java +++ b/bgp/util/src/test/java/org/opendaylight/protocol/bgp/util/BGPHexFileParserTest.java @@ -8,8 +8,8 @@ package org.opendaylight.protocol.bgp.util; import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import java.io.File; diff --git a/concepts/src/test/java/org/opendaylight/protocol/concepts/ASNumberTest.java b/concepts/src/test/java/org/opendaylight/protocol/concepts/ASNumberTest.java index c95af1da1a..6381406c20 100644 --- a/concepts/src/test/java/org/opendaylight/protocol/concepts/ASNumberTest.java +++ b/concepts/src/test/java/org/opendaylight/protocol/concepts/ASNumberTest.java @@ -5,14 +5,13 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.protocol.concepts; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertThat; import java.util.HashSet; import java.util.Set; diff --git a/concepts/src/test/java/org/opendaylight/protocol/concepts/BandwidthTest.java b/concepts/src/test/java/org/opendaylight/protocol/concepts/BandwidthTest.java index b98d2cc128..c32cbb9537 100644 --- a/concepts/src/test/java/org/opendaylight/protocol/concepts/BandwidthTest.java +++ b/concepts/src/test/java/org/opendaylight/protocol/concepts/BandwidthTest.java @@ -5,15 +5,14 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.protocol.concepts; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertThat; import io.netty.buffer.Unpooled; import java.util.HashSet; diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/UtilTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/UtilTest.java index 624881c155..772b752e51 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/UtilTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/UtilTest.java @@ -7,10 +7,10 @@ */ package org.opendaylight.protocol.pcep.impl; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.isA; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; import org.junit.Test; import org.opendaylight.protocol.pcep.impl.spi.Util; diff --git a/util/src/test/java/org/opendaylight/protocol/util/PCEPHexDumpParserTest.java b/util/src/test/java/org/opendaylight/protocol/util/PCEPHexDumpParserTest.java index 9e20992504..9f779fd516 100644 --- a/util/src/test/java/org/opendaylight/protocol/util/PCEPHexDumpParserTest.java +++ b/util/src/test/java/org/opendaylight/protocol/util/PCEPHexDumpParserTest.java @@ -8,8 +8,8 @@ package org.opendaylight.protocol.util; import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import java.io.File; -- 2.36.6