add more classes for LinkVideoToPptx example

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2020-12-04 16:12:47 +00:00
parent 0b51c32f5c
commit 7ed178852e

View File

@ -17,35 +17,42 @@
package org.apache.poi.xslf; 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.junit.Test;
import org.openxmlformats.schemas.presentationml.x2006.main.*;
// aim is to get these classes loaded and included in poi-ooxml-schemas.jar // aim is to get these classes loaded and included in poi-ooxml-schemas.jar
public class TestNecessaryOOXMLClasses { public class TestNecessaryOOXMLClasses {
@Test @Test
public void testProblemClasses() { public void testProblemClasses() {
STPlaceholderSize stPlaceholderSize = STPlaceholderSize.Factory.newInstance(); List<Supplier<XmlObject>> sup = Arrays.asList(
Assert.assertNotNull(stPlaceholderSize); org.openxmlformats.schemas.presentationml.x2006.main.STPlaceholderSize.Factory::newInstance,
CTHeaderFooter ctHeaderFooter = CTHeaderFooter.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.CTHeaderFooter.Factory::newInstance,
Assert.assertNotNull(ctHeaderFooter); //the following are used in LinkVideoToPptx example
//the following are used in LinkVideoToPptx example org.openxmlformats.schemas.drawingml.x2006.main.CTVideoFile.Factory::newInstance,
STTLTimeIndefinite sttlTimeIndefinite = STTLTimeIndefinite.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite.Factory::newInstance,
Assert.assertNotNull(sttlTimeIndefinite); org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType.Factory::newInstance,
STTLTimeNodeFillType sttlTimeNodeFillType = STTLTimeNodeFillType.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType.Factory::newInstance,
Assert.assertNotNull(sttlTimeNodeFillType); org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType.Factory::newInstance,
STTLTimeNodeRestartType sttlTimeNodeRestartType = STTLTimeNodeRestartType.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.CTExtension.Factory::newInstance,
Assert.assertNotNull(sttlTimeNodeRestartType); org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData.Factory::newInstance,
STTLTimeNodeType sttlTimeNodeType = STTLTimeNodeType.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData.Factory::newInstance,
Assert.assertNotNull(sttlTimeNodeType); org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList.Factory::newInstance,
CTExtension ctExtension = CTExtension.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.CTExtensionList.Factory::newInstance,
Assert.assertNotNull(ctExtension); org.openxmlformats.schemas.presentationml.x2006.main.CTSlideTiming.Factory::newInstance,
CTTLCommonMediaNodeData cttlCommonMediaNodeData = CTTLCommonMediaNodeData.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.CTTLMediaNodeVideo.Factory::newInstance,
Assert.assertNotNull(cttlCommonMediaNodeData); org.openxmlformats.schemas.presentationml.x2006.main.CTTLTimeConditionList.Factory::newInstance,
CTTLCommonTimeNodeData cttlCommonTimeNodeData = CTTLCommonTimeNodeData.Factory.newInstance(); org.openxmlformats.schemas.presentationml.x2006.main.CTTLTimeTargetElement.Factory::newInstance
Assert.assertNotNull(cttlCommonTimeNodeData); );
CTTimeNodeList ctTimeNodeList = CTTimeNodeList.Factory.newInstance();
Assert.assertNotNull(ctTimeNodeList); for (Supplier<XmlObject> xo : sup) {
assertNotNull(xo.get());
}
} }
} }