summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-12-04 16:12:47 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-12-04 16:12:47 +0000
commit7ed178852e09ba70eb441fe6073fd69b6bf2d585 (patch)
tree346ef513ee00e0eaf3026b10b3a648d9a50f0c5d /src
parent0b51c32f5c251eeb4ae033fd1e44e8fc925316d4 (diff)
downloadpoi-7ed178852e09ba70eb441fe6073fd69b6bf2d585.tar.gz
poi-7ed178852e09ba70eb441fe6073fd69b6bf2d585.zip
add more classes for LinkVideoToPptx example
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884099 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xslf/TestNecessaryOOXMLClasses.java53
1 files changed, 30 insertions, 23 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xslf/TestNecessaryOOXMLClasses.java b/src/ooxml/testcases/org/apache/poi/xslf/TestNecessaryOOXMLClasses.java
index 40c2dc5253..1572d8c34b 100644
--- a/src/ooxml/testcases/org/apache/poi/xslf/TestNecessaryOOXMLClasses.java
+++ b/src/ooxml/testcases/org/apache/poi/xslf/TestNecessaryOOXMLClasses.java
@@ -17,35 +17,42 @@
package org.apache.poi.xslf;
-import org.junit.Assert;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Supplier;
+
+import org.apache.xmlbeans.XmlObject;
import org.junit.Test;
-import org.openxmlformats.schemas.presentationml.x2006.main.*;
// aim is to get these classes loaded and included in poi-ooxml-schemas.jar
public class TestNecessaryOOXMLClasses {
@Test
public void testProblemClasses() {
- STPlaceholderSize stPlaceholderSize = STPlaceholderSize.Factory.newInstance();
- Assert.assertNotNull(stPlaceholderSize);
- CTHeaderFooter ctHeaderFooter = CTHeaderFooter.Factory.newInstance();
- Assert.assertNotNull(ctHeaderFooter);
- //the following are used in LinkVideoToPptx example
- STTLTimeIndefinite sttlTimeIndefinite = STTLTimeIndefinite.Factory.newInstance();
- Assert.assertNotNull(sttlTimeIndefinite);
- STTLTimeNodeFillType sttlTimeNodeFillType = STTLTimeNodeFillType.Factory.newInstance();
- Assert.assertNotNull(sttlTimeNodeFillType);
- STTLTimeNodeRestartType sttlTimeNodeRestartType = STTLTimeNodeRestartType.Factory.newInstance();
- Assert.assertNotNull(sttlTimeNodeRestartType);
- STTLTimeNodeType sttlTimeNodeType = STTLTimeNodeType.Factory.newInstance();
- Assert.assertNotNull(sttlTimeNodeType);
- CTExtension ctExtension = CTExtension.Factory.newInstance();
- Assert.assertNotNull(ctExtension);
- CTTLCommonMediaNodeData cttlCommonMediaNodeData = CTTLCommonMediaNodeData.Factory.newInstance();
- Assert.assertNotNull(cttlCommonMediaNodeData);
- CTTLCommonTimeNodeData cttlCommonTimeNodeData = CTTLCommonTimeNodeData.Factory.newInstance();
- Assert.assertNotNull(cttlCommonTimeNodeData);
- CTTimeNodeList ctTimeNodeList = CTTimeNodeList.Factory.newInstance();
- Assert.assertNotNull(ctTimeNodeList);
+ List<Supplier<XmlObject>> sup = Arrays.asList(
+ org.openxmlformats.schemas.presentationml.x2006.main.STPlaceholderSize.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTHeaderFooter.Factory::newInstance,
+ //the following are used in LinkVideoToPptx example
+ org.openxmlformats.schemas.drawingml.x2006.main.CTVideoFile.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTExtension.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTSlideTiming.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTTLMediaNodeVideo.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTTLTimeConditionList.Factory::newInstance,
+ org.openxmlformats.schemas.presentationml.x2006.main.CTTLTimeTargetElement.Factory::newInstance
+ );
+
+ for (Supplier<XmlObject> xo : sup) {
+ assertNotNull(xo.get());
+ }
}
}