You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/09/01 22:52:17 UTC
(commons-imaging) branch master updated: Use Assertions.assertInstanceOf()
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
The following commit(s) were added to refs/heads/master by this push:
new ee7b25f2 Use Assertions.assertInstanceOf()
ee7b25f2 is described below
commit ee7b25f2b7bd7d4c2ec52225d3c36c84308fb93e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Sep 1 18:52:12 2024 -0400
Use Assertions.assertInstanceOf()
---
src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java b/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
index 07990324..a6208b9a 100644
--- a/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
@@ -18,6 +18,7 @@
package org.apache.commons.imaging.formats.gif;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -144,7 +145,7 @@ public class GifReadTest extends AbstractGifTest {
public void testMetadata(final File imageFile) throws IOException {
final ImageMetadata metadata = Imaging.getMetadata(imageFile);
assertNotNull(metadata);
- assertTrue(metadata instanceof GifImageMetadata);
+ assertInstanceOf(GifImageMetadata.class, metadata);
assertTrue(((GifImageMetadata) metadata).getWidth() > 0);
assertTrue(((GifImageMetadata) metadata).getHeight() > 0);
assertNotNull(metadata.getItems());