aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-05-05 13:36:30 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-05-05 13:36:30 +0000
commit114a4dbd41c56e4c544836e58fae02aae6793cdf (patch)
tree11dc33570dd30b6641ee018319724bedded0869b /src/testcases/org/apache
parentce5f3df081d747feffad1c21c801a69eded30576 (diff)
downloadpoi-114a4dbd41c56e4c544836e58fae02aae6793cdf.tar.gz
poi-114a4dbd41c56e4c544836e58fae02aae6793cdf.zip
#64411 - Provide JigSaw modules
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877398 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache')
-rw-r--r--src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java b/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java
index 8b583e44df..fe57570c5d 100644
--- a/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java
+++ b/src/testcases/org/apache/poi/sl/draw/geom/TestPresetGeometries.java
@@ -21,13 +21,11 @@ package org.apache.poi.sl.draw.geom;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
import java.awt.geom.Path2D;
import java.awt.geom.Rectangle2D;
import java.net.URL;
import java.util.Enumeration;
-import java.util.Map;
import org.junit.Ignore;
import org.junit.Test;
@@ -35,8 +33,9 @@ import org.junit.Test;
public class TestPresetGeometries {
@Test
public void testRead(){
- Map<String, CustomGeometry> shapes = PresetGeometries.getInstance();
+ PresetGeometries shapes = PresetGeometries.getInstance();
assertEquals(187, shapes.size());
+ assertEquals(0x4533584F, shapes.hashCode());
for(String name : shapes.keySet()) {
CustomGeometry geom = shapes.get(name);
@@ -46,30 +45,17 @@ public class TestPresetGeometries {
assertNotNull(path);
}
}
-
+
// we get the same instance on further calls
assertSame(shapes, PresetGeometries.getInstance());
}
- // helper methods to adjust list of presets for other tests
- public static void clearPreset() {
- // ensure that we are initialized
- assertNotNull(PresetGeometries.getInstance());
-
- // test handling if some presets are not found
- PresetGeometries._inst.clear();
- }
-
- public static void resetPreset() {
- PresetGeometries._inst = null;
- }
-
@Ignore("problem solved? Turn back on if this debugging is still in process.")
@Test
public void testCheckXMLParser() throws Exception{
- // Gump reports a strange error because of an unavailable XML Parser, let's try to find out where
+ // Gump reports a strange error because of an unavailable XML Parser, let's try to find out where
// this comes from
- //
+ //
Enumeration<URL> resources = this.getClass().getClassLoader().getResources("META-INF/services/javax.xml.stream.XMLEventFactory");
printURLs(resources);
resources = ClassLoader.getSystemResources("META-INF/services/javax.xml.stream.XMLEventFactory");