diff options
author | Simon Steiner <ssteiner@apache.org> | 2021-12-08 09:31:40 +0000 |
---|---|---|
committer | Simon Steiner <ssteiner@apache.org> | 2021-12-08 09:31:40 +0000 |
commit | 98ae9002721bd362082ba401436e595e9746455c (patch) | |
tree | beb72e91ee17f26a88dcd4011d007c63122c9a35 /fop-core/src | |
parent | a90d19d6ef388448fb1cf49f029ff11f43f7561c (diff) | |
download | xmlgraphics-fop-98ae9002721bd362082ba401436e595e9746455c.tar.gz xmlgraphics-fop-98ae9002721bd362082ba401436e595e9746455c.zip |
Fix mockito warnings
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1895684 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop-core/src')
20 files changed, 40 insertions, 41 deletions
diff --git a/fop-core/src/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java b/fop-core/src/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java index 50568db1b..c5dee2f7c 100644 --- a/fop-core/src/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java @@ -33,7 +33,7 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/fop-core/src/test/java/org/apache/fop/fo/FONodeMocks.java b/fop-core/src/test/java/org/apache/fop/fo/FONodeMocks.java index 97889c177..d729157f2 100644 --- a/fop-core/src/test/java/org/apache/fop/fo/FONodeMocks.java +++ b/fop-core/src/test/java/org/apache/fop/fo/FONodeMocks.java @@ -21,8 +21,8 @@ package org.apache.fop.fo; import java.io.IOException; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyString; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/fo/flow/table/HeaderColumnTestCase.java b/fop-core/src/test/java/org/apache/fop/fo/flow/table/HeaderColumnTestCase.java index 590af6a72..01686745c 100644 --- a/fop-core/src/test/java/org/apache/fop/fo/flow/table/HeaderColumnTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/fo/flow/table/HeaderColumnTestCase.java @@ -25,10 +25,10 @@ import org.xml.sax.Locator; import org.xml.sax.helpers.AttributesImpl; import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.nullable; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/fo/pagination/PageSequenceMasterTestCase.java b/fop-core/src/test/java/org/apache/fop/fo/pagination/PageSequenceMasterTestCase.java index d21671352..d1f8433cf 100644 --- a/fop-core/src/test/java/org/apache/fop/fo/pagination/PageSequenceMasterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/fo/pagination/PageSequenceMasterTestCase.java @@ -23,12 +23,11 @@ import org.junit.Test; import org.xml.sax.Locator; import static org.junit.Assert.fail; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.nullable; -import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyInt; -import static org.mockito.Matchers.anyObject; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -86,8 +85,8 @@ public class PageSequenceMasterTestCase { pageSequenceMaster.getNextSimplePageMaster(false, false, false, false, null); - verify(mockBlockLevelEventProducer).pageSequenceMasterExhausted((Locator)anyObject(), - nullable(String.class), eq(canResume), (Locator)anyObject()); + verify(mockBlockLevelEventProducer).pageSequenceMasterExhausted(nullable(Object.class), + nullable(String.class), eq(canResume), nullable(Locator.class)); } /** diff --git a/fop-core/src/test/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternativesTestCase.java b/fop-core/src/test/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternativesTestCase.java index ce1a97638..aed714c93 100644 --- a/fop-core/src/test/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternativesTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternativesTestCase.java @@ -22,8 +22,8 @@ package org.apache.fop.fo.pagination; import org.junit.Test; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyInt; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/fo/properties/PropertyListMocks.java b/fop-core/src/test/java/org/apache/fop/fo/properties/PropertyListMocks.java index f364c9034..871b0648b 100644 --- a/fop-core/src/test/java/org/apache/fop/fo/properties/PropertyListMocks.java +++ b/fop-core/src/test/java/org/apache/fop/fo/properties/PropertyListMocks.java @@ -19,7 +19,7 @@ package org.apache.fop.fo.properties; -import static org.mockito.Matchers.anyInt; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/fonts/FontSelectorTestCase.java b/fop-core/src/test/java/org/apache/fop/fonts/FontSelectorTestCase.java index 0062e006d..0871901cd 100644 --- a/fop-core/src/test/java/org/apache/fop/fonts/FontSelectorTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/fonts/FontSelectorTestCase.java @@ -25,8 +25,8 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.anyInt; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/fonts/truetype/OTFSubSetFileTestCase.java b/fop-core/src/test/java/org/apache/fop/fonts/truetype/OTFSubSetFileTestCase.java index 57d5d0f46..e9a610d96 100644 --- a/fop-core/src/test/java/org/apache/fop/fonts/truetype/OTFSubSetFileTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/fonts/truetype/OTFSubSetFileTestCase.java @@ -37,7 +37,7 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/layoutmgr/PageSequenceLayoutManagerTestCase.java b/fop-core/src/test/java/org/apache/fop/layoutmgr/PageSequenceLayoutManagerTestCase.java index a87dc0fa0..f4ebc010c 100644 --- a/fop-core/src/test/java/org/apache/fop/layoutmgr/PageSequenceLayoutManagerTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/layoutmgr/PageSequenceLayoutManagerTestCase.java @@ -22,7 +22,7 @@ package org.apache.fop.layoutmgr; import org.junit.Test; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.anyInt; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/pdf/TableHeaderScopeTestCase.java b/fop-core/src/test/java/org/apache/fop/pdf/TableHeaderScopeTestCase.java index 446859e93..15537a839 100644 --- a/fop-core/src/test/java/org/apache/fop/pdf/TableHeaderScopeTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/pdf/TableHeaderScopeTestCase.java @@ -24,9 +24,9 @@ import org.mockito.ArgumentMatcher; import org.mockito.verification.VerificationMode; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.argThat; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; diff --git a/fop-core/src/test/java/org/apache/fop/render/intermediate/IFSerializerTestCase.java b/fop-core/src/test/java/org/apache/fop/render/intermediate/IFSerializerTestCase.java index e8064fb55..075bfa417 100644 --- a/fop-core/src/test/java/org/apache/fop/render/intermediate/IFSerializerTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/intermediate/IFSerializerTestCase.java @@ -31,8 +31,8 @@ import org.junit.Test; import org.xml.sax.helpers.DefaultHandler; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.nullable; -import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java b/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java index 6a08b43d0..8e23195cb 100644 --- a/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java @@ -42,9 +42,9 @@ import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; import static org.junit.Assert.fail; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.argThat; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/fop-core/src/test/java/org/apache/fop/render/java2d/Java2DUtilTestCase.java b/fop-core/src/test/java/org/apache/fop/render/java2d/Java2DUtilTestCase.java index 7b9084e44..76c743487 100644 --- a/fop-core/src/test/java/org/apache/fop/render/java2d/Java2DUtilTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/java2d/Java2DUtilTestCase.java @@ -28,9 +28,9 @@ import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.nullable; -import static org.mockito.Matchers.anyInt; -import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java index 63833ce3c..20d42e395 100644 --- a/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/pdf/ImageRenderedAdapterTestCase.java @@ -28,8 +28,8 @@ import java.awt.image.RenderedImage; import org.junit.Test; import static org.junit.Assert.assertNotNull; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.nullable; -import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFGraphicsPainterTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFGraphicsPainterTestCase.java index 9b69660df..5ba5811aa 100644 --- a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFGraphicsPainterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFGraphicsPainterTestCase.java @@ -24,8 +24,8 @@ import java.io.IOException; import org.junit.Before; import org.junit.Test; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.endsWith; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.endsWith; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFPainterTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFPainterTestCase.java index 1fe4a76df..59766c985 100644 --- a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFPainterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFPainterTestCase.java @@ -37,7 +37,7 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.endsWith; +import static org.mockito.ArgumentMatchers.endsWith; import static org.mockito.Mockito.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; diff --git a/fop-core/src/test/java/org/apache/fop/render/ps/PSPainterTestCase.java b/fop-core/src/test/java/org/apache/fop/render/ps/PSPainterTestCase.java index 8cc47ad0f..61100bf3e 100644 --- a/fop-core/src/test/java/org/apache/fop/render/ps/PSPainterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/ps/PSPainterTestCase.java @@ -34,11 +34,11 @@ import org.junit.Test; import org.mockito.verification.VerificationMode; import static org.junit.Assert.fail; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyDouble; +import static org.mockito.ArgumentMatchers.anyFloat; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyFloat; -import static org.mockito.Matchers.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; diff --git a/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java b/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java index c6f062a84..eb0bc382a 100644 --- a/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/svg/font/BasicGlyphVectorTestCase.java @@ -32,8 +32,8 @@ import org.junit.Test; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.anyInt; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/svg/font/FOPGVTFontTestCase.java b/fop-core/src/test/java/org/apache/fop/svg/font/FOPGVTFontTestCase.java index b27dac5b2..75c669b40 100644 --- a/fop-core/src/test/java/org/apache/fop/svg/font/FOPGVTFontTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/svg/font/FOPGVTFontTestCase.java @@ -25,7 +25,7 @@ import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/fop-core/src/test/java/org/apache/fop/svg/font/KerningGlyphLayoutTestCase.java b/fop-core/src/test/java/org/apache/fop/svg/font/KerningGlyphLayoutTestCase.java index 94e848b73..ff3b84cb9 100644 --- a/fop-core/src/test/java/org/apache/fop/svg/font/KerningGlyphLayoutTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/svg/font/KerningGlyphLayoutTestCase.java @@ -25,8 +25,8 @@ import java.text.StringCharacterIterator; import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
|