From 2a4ea9c4eaa3b597a13c554a4db4260a6f4b0106 Mon Sep 17 00:00:00 2001 From: Egon Willighagen Date: Sun, 17 Dec 2023 11:04:49 +0100 Subject: [PATCH] Updated for the java.util.Base64 use --- src/test/java/org/xmlcml/graphics/svg/SVGImageTest.java | 7 ++----- .../org/xmlcml/graphics/svg/image/ImageConverterTest.java | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/xmlcml/graphics/svg/SVGImageTest.java b/src/test/java/org/xmlcml/graphics/svg/SVGImageTest.java index 57100d8..0d48b5f 100755 --- a/src/test/java/org/xmlcml/graphics/svg/SVGImageTest.java +++ b/src/test/java/org/xmlcml/graphics/svg/SVGImageTest.java @@ -36,9 +36,7 @@ public void testReadContent() { SVGImage image = SVGImage.extractSelfAndDescendantImages(svgElement).get(0); Assert.assertNotNull(image); String dataValue = image.getImageValue(); - Assert.assertEquals("data", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMklEQVR42mP4J8LwHx0zAAE2cWzyeBUSgxnw2UwMnzouINVmnF4YwmEwmg7Is3kYhQEA6pzZRchLX5wAAAAASUVORK5CYII=", - dataValue); + Assert.assertTrue("data", dataValue.contains("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA")); } @Test @@ -60,8 +58,7 @@ public void testRoundtripImage() throws Exception { svgImage.format(3); // - Assert.assertEquals("image", "", - svgImage1.toXML()); + Assert.assertTrue("image", svgImage1.toXML().startsWith("", - svgElement.toXML()); + Assert.assertTrue("image", svgElement.toXML().startsWith("