From 96fd294cdb009ef9a196dca3a52a4197c36c008c Mon Sep 17 00:00:00 2001 From: Jon Frydensbjerg Date: Thu, 22 Aug 2024 11:22:09 +0200 Subject: [PATCH] Check that an unknown format returns null --- .../java/com/github/kokorin/jaffree/util/ParseUtilTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/com/github/kokorin/jaffree/util/ParseUtilTest.java b/src/test/java/com/github/kokorin/jaffree/util/ParseUtilTest.java index b2fc03de..111a89a1 100644 --- a/src/test/java/com/github/kokorin/jaffree/util/ParseUtilTest.java +++ b/src/test/java/com/github/kokorin/jaffree/util/ParseUtilTest.java @@ -69,6 +69,9 @@ public void parseKibiByteFormats() { final Long newFormat = ParseUtil.parseSizeInKibiBytes("2904KiB"); Assert.assertEquals(2904L, newFormat.longValue()); + + final Long unknownFormat = ParseUtil.parseSizeInKibiBytes("2904KB"); + Assert.assertNull(unknownFormat); } @Test