From 7ed178852e09ba70eb441fe6073fd69b6bf2d585 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Fri, 4 Dec 2020 16:12:47 +0000 Subject: [PATCH] add more classes for LinkVideoToPptx example git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884099 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/xslf/TestNecessaryOOXMLClasses.java | 53 +++++++++++-------- 1 file 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> 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 xo : sup) { + assertNotNull(xo.get()); + } } } -- 2.39.5