mirror of https://github.com/apache/poi.git
Sonar fixes
JUnit5 test classes and methods should have default package visibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885302 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8631e6c9c9
commit
1d676a098d
Binary file not shown.
|
@ -85,6 +85,59 @@ module org.apache.poi.scratchpad {
|
|||
exports org.apache.poi.hwmf to org.junit.platform.commons;
|
||||
exports org.apache.poi.hwpf.util to org.junit.platform.commons;
|
||||
|
||||
opens org.apache.poi.hwpf.model to org.mockito;
|
||||
opens org.apache.poi.hwpf.model.types to org.mockito;
|
||||
opens org.apache.poi.hwpf.model to org.mockito, org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.model.types to org.mockito, org.junit.platform.commons;
|
||||
|
||||
opens org.apache.poi.hmef to org.junit.platform.commons;
|
||||
opens org.apache.poi.hmef.dev to org.junit.platform.commons;
|
||||
opens org.apache.poi.hmef.extractor to org.junit.platform.commons;
|
||||
opens org.apache.poi.hmef.attribute to org.junit.platform.commons;
|
||||
opens org.apache.poi.hdgf to org.junit.platform.commons;
|
||||
opens org.apache.poi.hdgf.dev to org.junit.platform.commons;
|
||||
opens org.apache.poi.hdgf.streams to org.junit.platform.commons;
|
||||
opens org.apache.poi.hdgf.extractor to org.junit.platform.commons;
|
||||
opens org.apache.poi.hdgf.pointers to org.junit.platform.commons;
|
||||
opens org.apache.poi.hdgf.exceptions to org.junit.platform.commons;
|
||||
opens org.apache.poi.hdgf.chunks to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.dev to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.sprm to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.converter to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.extractor to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.usermodel to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.model.io to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwpf.util to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwmf to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwmf.record to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwmf.draw to org.junit.platform.commons;
|
||||
opens org.apache.poi.hwmf.usermodel to org.junit.platform.commons;
|
||||
opens org.apache.poi.extractor.ole2 to org.junit.platform.commons;
|
||||
opens org.apache.poi.hpbf to org.junit.platform.commons;
|
||||
opens org.apache.poi.hpbf.dev to org.junit.platform.commons;
|
||||
opens org.apache.poi.hpbf.extractor to org.junit.platform.commons;
|
||||
opens org.apache.poi.hpbf.model to org.junit.platform.commons;
|
||||
opens org.apache.poi.hpbf.model.qcbits to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.dev to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.record to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.extractor to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.exceptions to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.usermodel to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.blip to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.model to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.model.textproperties to org.junit.platform.commons;
|
||||
opens org.apache.poi.hslf.util to org.junit.platform.commons;
|
||||
opens org.apache.poi.hssf.converter to org.junit.platform.commons;
|
||||
opens org.apache.poi.hsmf to org.junit.platform.commons;
|
||||
opens org.apache.poi.hsmf.dev to org.junit.platform.commons;
|
||||
opens org.apache.poi.hsmf.datatypes to org.junit.platform.commons;
|
||||
opens org.apache.poi.hsmf.extractor to org.junit.platform.commons;
|
||||
opens org.apache.poi.hsmf.exceptions to org.junit.platform.commons;
|
||||
opens org.apache.poi.hsmf.parsers to org.junit.platform.commons;
|
||||
opens org.apache.poi.hemf.record.emf to org.junit.platform.commons;
|
||||
opens org.apache.poi.hemf.record.emfplus to org.junit.platform.commons;
|
||||
opens org.apache.poi.hemf.hemfplus.extractor to org.junit.platform.commons;
|
||||
opens org.apache.poi.hemf.draw to org.junit.platform.commons;
|
||||
opens org.apache.poi.hemf.usermodel to org.junit.platform.commons;
|
||||
|
||||
}
|
|
@ -47,12 +47,12 @@ public final class TestHDGFCore {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
hdgf = new HDGFDiagram(fs);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTrailer() throws Exception {
|
||||
void testTrailer() throws Exception {
|
||||
hdgf = new HDGFDiagram(fs);
|
||||
assertNotNull(hdgf);
|
||||
assertNotNull(hdgf.getTrailerStream());
|
||||
|
@ -80,7 +80,7 @@ public final class TestHDGFCore {
|
|||
* break with a negative chunk length
|
||||
*/
|
||||
@Test
|
||||
public void testNegativeChunkLength() throws Exception {
|
||||
void testNegativeChunkLength() throws Exception {
|
||||
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("NegativeChunkLength.vsd"));
|
||||
|
||||
hdgf = new HDGFDiagram(fs);
|
||||
|
@ -106,7 +106,7 @@ public final class TestHDGFCore {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testV5() throws Exception {
|
||||
void testV5() throws Exception {
|
||||
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v5_Connection_Types.vsd"));
|
||||
|
||||
hdgf = new HDGFDiagram(fs);
|
||||
|
@ -119,7 +119,7 @@ public final class TestHDGFCore {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testV6NonUtf16LE() throws Exception {
|
||||
void testV6NonUtf16LE() throws Exception {
|
||||
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v6-non-utf16le.vsd"));
|
||||
|
||||
hdgf = new HDGFDiagram(fs);
|
||||
|
@ -132,7 +132,7 @@ public final class TestHDGFCore {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUtf16LE() throws Exception {
|
||||
void testUtf16LE() throws Exception {
|
||||
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("Test_Visio-Some_Random_Text.vsd"));
|
||||
|
||||
hdgf = new HDGFDiagram(fs);
|
||||
|
|
|
@ -113,7 +113,7 @@ public final class TestHDGFLZW {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testCounts() throws Exception {
|
||||
void testCounts() throws Exception {
|
||||
assertEquals(339, testTrailerComp.length);
|
||||
assertEquals(632, testTrailerDecomp.length);
|
||||
|
||||
|
@ -134,7 +134,7 @@ public final class TestHDGFLZW {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testDecompress() throws Exception {
|
||||
void testDecompress() throws Exception {
|
||||
assertEquals(339, testTrailerComp.length);
|
||||
assertEquals(632, testTrailerDecomp.length);
|
||||
|
||||
|
@ -152,7 +152,7 @@ public final class TestHDGFLZW {
|
|||
* on the best way to compress it
|
||||
*/
|
||||
@Test
|
||||
public void testCompressMini() throws Exception {
|
||||
void testCompressMini() throws Exception {
|
||||
// first 11 bytes compressed = 12 bytes uncompressed
|
||||
byte[] sourceDecomp = Arrays.copyOf(testTrailerDecomp, 12);
|
||||
|
||||
|
@ -176,7 +176,7 @@ public final class TestHDGFLZW {
|
|||
* Tests that we can do several mask pages
|
||||
*/
|
||||
@Test
|
||||
public void testCompressMidi() throws Exception {
|
||||
void testCompressMidi() throws Exception {
|
||||
// First 12 -> 11
|
||||
// Next 32 -> 13
|
||||
byte[] sourceDecomp = Arrays.copyOf(testTrailerDecomp, 44);
|
||||
|
@ -196,7 +196,7 @@ public final class TestHDGFLZW {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCompressFull() throws Exception {
|
||||
void testCompressFull() throws Exception {
|
||||
assertEquals(339, testTrailerComp.length);
|
||||
assertEquals(632, testTrailerDecomp.length);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class TestChunks {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testChunkHeaderA() {
|
||||
void testChunkHeaderA() {
|
||||
ChunkHeader h = ChunkHeader.createChunkHeader(11, data_a, 0);
|
||||
|
||||
assertTrue(h instanceof ChunkHeaderV11);
|
||||
|
@ -63,7 +63,7 @@ public final class TestChunks {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testChunkHeaderB() {
|
||||
void testChunkHeaderB() {
|
||||
ChunkHeader h = ChunkHeader.createChunkHeader(11, data_b, 0);
|
||||
|
||||
assertTrue(h instanceof ChunkHeaderV11);
|
||||
|
@ -81,7 +81,7 @@ public final class TestChunks {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOneChunk() throws Exception {
|
||||
void testOneChunk() throws Exception {
|
||||
ChunkFactory cf = new ChunkFactory(11);
|
||||
cf.createChunk(data_a, 0);
|
||||
cf.createChunk(data_b, 0);
|
||||
|
@ -114,7 +114,7 @@ public final class TestChunks {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testAnotherChunk() throws Exception {
|
||||
void testAnotherChunk() throws Exception {
|
||||
ChunkFactory cf = new ChunkFactory(11);
|
||||
|
||||
// Go for the 2nd chunk in the stream
|
||||
|
@ -151,7 +151,7 @@ public final class TestChunks {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testManyChunks() throws Exception {
|
||||
void testManyChunks() throws Exception {
|
||||
ChunkFactory cf = new ChunkFactory(11);
|
||||
Chunk chunk;
|
||||
int offset = 0;
|
||||
|
|
|
@ -38,7 +38,7 @@ public final class TestVisioExtractor {
|
|||
* Test the 3 different ways of creating one
|
||||
*/
|
||||
@Test
|
||||
public void testCreation() throws IOException {
|
||||
void testCreation() throws IOException {
|
||||
VisioTextExtractor extractor1 = openExtractor(defFilename);
|
||||
assertNotNull(extractor1);
|
||||
assertNotNull(extractor1.getAllText());
|
||||
|
@ -71,7 +71,7 @@ public final class TestVisioExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExtraction() throws Exception {
|
||||
void testExtraction() throws Exception {
|
||||
VisioTextExtractor extractor = openExtractor(defFilename);
|
||||
|
||||
// Check the array fetch
|
||||
|
@ -92,7 +92,7 @@ public final class TestVisioExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testProblemFiles() throws Exception {
|
||||
void testProblemFiles() throws Exception {
|
||||
String[] files = {
|
||||
"44594.vsd", "44594-2.vsd",
|
||||
"ShortChunk1.vsd", "ShortChunk2.vsd", "ShortChunk3.vsd",
|
||||
|
|
|
@ -52,13 +52,13 @@ public final class TestPointerFactory {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testCreateV4() {
|
||||
void testCreateV4() {
|
||||
PointerFactory pf = new PointerFactory(4);
|
||||
assertThrows(IllegalArgumentException.class, () -> pf.createPointer(new byte[]{}, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateV5() {
|
||||
void testCreateV5() {
|
||||
PointerFactory pf = new PointerFactory(5);
|
||||
|
||||
Pointer a = pf.createPointer(vp5_a, 0);
|
||||
|
@ -78,7 +78,7 @@ public final class TestPointerFactory {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreateV6() {
|
||||
void testCreateV6() {
|
||||
PointerFactory pf = new PointerFactory(6);
|
||||
|
||||
Pointer a = pf.createPointer(vp6_a, 0);
|
||||
|
@ -135,7 +135,7 @@ public final class TestPointerFactory {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreateV6FromMid() {
|
||||
void testCreateV6FromMid() {
|
||||
PointerFactory pf = new PointerFactory(11);
|
||||
|
||||
// Create a from part way down the byte stream
|
||||
|
|
|
@ -56,7 +56,7 @@ public final class TestStreamBasics extends StreamTest {
|
|||
|
||||
|
||||
@Test
|
||||
public void testCompressedStream() {
|
||||
void testCompressedStream() {
|
||||
// Create a fake pointer
|
||||
Pointer ptr = new TestPointer(true, 0, compressedStream.length, -1, (short)-1);
|
||||
// Now the stream
|
||||
|
@ -80,7 +80,7 @@ public final class TestStreamBasics extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUncompressedStream() {
|
||||
void testUncompressedStream() {
|
||||
// Create a fake pointer
|
||||
Pointer ptr = new TestPointer(false, 0, uncompressedStream.length, -1, (short)-1);
|
||||
// Now the stream
|
||||
|
|
|
@ -55,7 +55,7 @@ public final class TestStreamBugs extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetTrailer() {
|
||||
void testGetTrailer() {
|
||||
Pointer trailerPointer = ptrFactory.createPointer(contents, 0x24);
|
||||
Stream.createStream(trailerPointer, contents, chunkFactory, ptrFactory);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public final class TestStreamBugs extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetChildren() {
|
||||
void testGetChildren() {
|
||||
Pointer trailerPointer = ptrFactory.createPointer(contents, 0x24);
|
||||
TrailerStream trailer = (TrailerStream)
|
||||
Stream.createStream(trailerPointer, contents, chunkFactory, ptrFactory);
|
||||
|
@ -103,7 +103,7 @@ public final class TestStreamBugs extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOpen() throws IOException {
|
||||
void testOpen() throws IOException {
|
||||
new HDGFDiagram(filesystem).close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public final class TestStreamComplex extends StreamTest {
|
|||
* Test creating the trailer, but not looking for children
|
||||
*/
|
||||
@Test
|
||||
public void testTrailer() {
|
||||
void testTrailer() {
|
||||
// Find the trailer
|
||||
Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt);
|
||||
|
||||
|
@ -86,7 +86,7 @@ public final class TestStreamComplex extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testChunks() {
|
||||
void testChunks() {
|
||||
Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt);
|
||||
TrailerStream ts = (TrailerStream)
|
||||
Stream.createStream(trailerPtr, contents, chunkFactory, ptrFactory);
|
||||
|
@ -107,7 +107,7 @@ public final class TestStreamComplex extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testStrings() {
|
||||
void testStrings() {
|
||||
Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt);
|
||||
TrailerStream ts = (TrailerStream)
|
||||
Stream.createStream(trailerPtr, contents, chunkFactory, ptrFactory);
|
||||
|
@ -124,7 +124,7 @@ public final class TestStreamComplex extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPointerToStrings() {
|
||||
void testPointerToStrings() {
|
||||
// The stream at 0x347f has strings
|
||||
// The stream at 0x4312 has a pointer to 0x347f
|
||||
// The stream at 0x44d3 has a pointer to 0x4312
|
||||
|
@ -169,7 +169,7 @@ public final class TestStreamComplex extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTrailerContents() {
|
||||
void testTrailerContents() {
|
||||
Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt);
|
||||
TrailerStream ts = (TrailerStream)
|
||||
Stream.createStream(trailerPtr, contents, chunkFactory, ptrFactory);
|
||||
|
@ -221,7 +221,7 @@ public final class TestStreamComplex extends StreamTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testChunkWithText() {
|
||||
void testChunkWithText() {
|
||||
// Parent ChunkStream is at 0x7194
|
||||
// This is one of the last children of the trailer
|
||||
Pointer trailerPtr = ptrFactory.createPointer(contents, trailerPointerAt);
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
|
|||
public class TestHemfPlusExtractor {
|
||||
|
||||
@Test
|
||||
public void testBasic() throws Exception {
|
||||
void testBasic() throws Exception {
|
||||
//test header
|
||||
EmfCommentDataPlus emfPlus = getCommentRecord("SimpleEMF_windows.emf", 0);
|
||||
List<HemfPlusRecord> records = emfPlus.getRecords();
|
||||
|
|
|
@ -123,7 +123,7 @@ public class TestHemfPicture {
|
|||
}
|
||||
*/
|
||||
@Test
|
||||
public void testBasicWindows() throws Exception {
|
||||
void testBasicWindows() throws Exception {
|
||||
try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_windows.emf")) {
|
||||
HemfPicture pic = new HemfPicture(is);
|
||||
HemfHeader header = pic.getHeader();
|
||||
|
@ -140,7 +140,7 @@ public class TestHemfPicture {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBasicMac() throws Exception {
|
||||
void testBasicMac() throws Exception {
|
||||
try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_mac.emf")) {
|
||||
HemfPicture pic = new HemfPicture(is);
|
||||
HemfHeader header = pic.getHeader();
|
||||
|
@ -176,7 +176,7 @@ public class TestHemfPicture {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMacText() throws Exception {
|
||||
void testMacText() throws Exception {
|
||||
try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_mac.emf")) {
|
||||
HemfPicture pic = new HemfPicture(is);
|
||||
|
||||
|
@ -208,7 +208,7 @@ public class TestHemfPicture {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWMFInsideEMF() throws Exception {
|
||||
void testWMFInsideEMF() throws Exception {
|
||||
|
||||
byte[] wmfData = null;
|
||||
try (InputStream is = ss_samples.openResourceAsStream("63327.emf")) {
|
||||
|
@ -237,7 +237,7 @@ public class TestHemfPicture {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWindowsText() throws Exception {
|
||||
void testWindowsText() throws Exception {
|
||||
try (InputStream is = ss_samples.openResourceAsStream("SimpleEMF_windows.emf")) {
|
||||
HemfPicture pic = new HemfPicture(is);
|
||||
double lastY = -1;
|
||||
|
@ -276,7 +276,7 @@ public class TestHemfPicture {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInfiniteLoopOnFile() throws Exception {
|
||||
void testInfiniteLoopOnFile() throws Exception {
|
||||
try (InputStream is = ss_samples.openResourceAsStream("61294.emf")) {
|
||||
HemfPicture pic = new HemfPicture(is);
|
||||
assertThrows(RecordFormatException.class, () -> pic.forEach(r -> {}));
|
||||
|
@ -284,7 +284,7 @@ public class TestHemfPicture {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInfiniteLoopOnByteArray() throws Exception {
|
||||
void testInfiniteLoopOnByteArray() throws Exception {
|
||||
try (InputStream is = ss_samples.openResourceAsStream("61294.emf")) {
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
IOUtils.copy(is, bos);
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class TestAttachments {
|
|||
* Check the file is as we expect
|
||||
*/
|
||||
@Test
|
||||
public void testCounts() {
|
||||
void testCounts() {
|
||||
// Should have 5 attachments
|
||||
assertEquals(5, quick.getAttachments().size());
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public final class TestAttachments {
|
|||
* Check some basic bits about the attachments
|
||||
*/
|
||||
@Test
|
||||
public void testBasicAttachments() {
|
||||
void testBasicAttachments() {
|
||||
List<Attachment> attachments = quick.getAttachments();
|
||||
|
||||
// Word first
|
||||
|
@ -86,7 +86,7 @@ public final class TestAttachments {
|
|||
* the right values for key things
|
||||
*/
|
||||
@Test
|
||||
public void testAttachmentDetails() {
|
||||
void testAttachmentDetails() {
|
||||
List<Attachment> attachments = quick.getAttachments();
|
||||
assertEquals(5, attachments.size());
|
||||
|
||||
|
@ -108,7 +108,7 @@ public final class TestAttachments {
|
|||
* Ensure the attachment contents come back as they should do
|
||||
*/
|
||||
@Test
|
||||
public void testAttachmentContents() throws Exception {
|
||||
void testAttachmentContents() throws Exception {
|
||||
List<Attachment> attachments = quick.getAttachments();
|
||||
|
||||
assertContents("quick.doc", attachments.get(0));
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
public class TestBugs {
|
||||
@Test
|
||||
public void test52400ReadSimpleTNEF() throws IOException {
|
||||
void test52400ReadSimpleTNEF() throws IOException {
|
||||
HMEFMessage tnefDat = openSample("bug52400-winmail-simple.dat");
|
||||
MAPIAttribute bodyHtml = tnefDat.getMessageMAPIAttribute(MAPIProperty.BODY_HTML);
|
||||
assertNotNull(bodyHtml);
|
||||
|
@ -42,7 +42,7 @@ public class TestBugs {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void test52400ReadAttachedTNEF() throws IOException {
|
||||
void test52400ReadAttachedTNEF() throws IOException {
|
||||
HMEFMessage tnefDat = openSample("bug52400-winmail-with-attachments.dat");
|
||||
MAPIAttribute bodyHtml = tnefDat.getMessageMAPIAttribute(MAPIProperty.BODY_HTML);
|
||||
assertNotNull(bodyHtml);
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class TestCompressedRTF {
|
|||
* then decoding has no hope...
|
||||
*/
|
||||
@Test
|
||||
public void testQuickBasics() throws Exception {
|
||||
void testQuickBasics() throws Exception {
|
||||
HMEFMessage msg;
|
||||
try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) {
|
||||
msg = new HMEFMessage(is);
|
||||
|
@ -108,7 +108,7 @@ public final class TestCompressedRTF {
|
|||
* (1 flag byte + 8 codes)
|
||||
*/
|
||||
@Test
|
||||
public void testFirstBlock() throws Exception {
|
||||
void testFirstBlock() throws Exception {
|
||||
HMEFMessage msg;
|
||||
try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) {
|
||||
msg = new HMEFMessage(is);
|
||||
|
@ -136,7 +136,7 @@ public final class TestCompressedRTF {
|
|||
* (flag + 8 codes, flag + 8 codes)
|
||||
*/
|
||||
@Test
|
||||
public void testFirstTwoBlocks() throws Exception {
|
||||
void testFirstTwoBlocks() throws Exception {
|
||||
HMEFMessage msg;
|
||||
try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) {
|
||||
msg = new HMEFMessage(is);
|
||||
|
@ -163,7 +163,7 @@ public final class TestCompressedRTF {
|
|||
* TODO Fix what looks like a padding issue
|
||||
*/
|
||||
@Test
|
||||
public void testFull() throws Exception {
|
||||
void testFull() throws Exception {
|
||||
final HMEFMessage msg;
|
||||
try (InputStream is = _samples.openResourceAsStream("quick-winmail.dat")) {
|
||||
msg = new HMEFMessage(is);
|
||||
|
|
|
@ -46,7 +46,7 @@ public final class TestHMEFMessage {
|
|||
private static final POIDataSamples _samples = POIDataSamples.getHMEFInstance();
|
||||
|
||||
@Test
|
||||
public void testCounts() throws Exception {
|
||||
void testCounts() throws Exception {
|
||||
HMEFMessage msg = openSample("quick-winmail.dat");
|
||||
|
||||
// Should have 4 attributes on the message
|
||||
|
@ -72,7 +72,7 @@ public final class TestHMEFMessage {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBasicMessageAttributes() throws Exception {
|
||||
void testBasicMessageAttributes() throws Exception {
|
||||
HMEFMessage msg = openSample("quick-winmail.dat");
|
||||
|
||||
// Should have version, codepage, class and MAPI
|
||||
|
@ -103,7 +103,7 @@ public final class TestHMEFMessage {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBasicMessageMAPIAttributes() throws Exception {
|
||||
void testBasicMessageMAPIAttributes() throws Exception {
|
||||
HMEFMessage msg = openSample("quick-winmail.dat");
|
||||
|
||||
assertEquals("This is a test message", msg.getSubject());
|
||||
|
@ -115,7 +115,7 @@ public final class TestHMEFMessage {
|
|||
* can be correctly extracted
|
||||
*/
|
||||
@Test
|
||||
public void testMessageContents() throws Exception {
|
||||
void testMessageContents() throws Exception {
|
||||
HMEFMessage msg = openSample("quick-winmail.dat");
|
||||
|
||||
// Firstly by byte
|
||||
|
@ -135,7 +135,7 @@ public final class TestHMEFMessage {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMessageSample1() throws Exception {
|
||||
void testMessageSample1() throws Exception {
|
||||
HMEFMessage msg = openSample("winmail-sample1.dat");
|
||||
|
||||
// Firstly by byte
|
||||
|
@ -157,7 +157,7 @@ public final class TestHMEFMessage {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidMessage() {
|
||||
void testInvalidMessage() {
|
||||
InputStream str = new ByteArrayInputStream(new byte[4]);
|
||||
IllegalArgumentException ex = assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
|
@ -167,7 +167,7 @@ public final class TestHMEFMessage {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNoData() throws Exception {
|
||||
void testNoData() throws Exception {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
// Header
|
||||
|
@ -184,7 +184,7 @@ public final class TestHMEFMessage {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidLevel() throws Exception {
|
||||
void testInvalidLevel() throws Exception {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
// Header
|
||||
|
@ -205,7 +205,7 @@ public final class TestHMEFMessage {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCustomProperty() throws IOException {
|
||||
void testCustomProperty() throws IOException {
|
||||
HMEFMessage msg = openSample("quick-winmail.dat");
|
||||
|
||||
// Should have non-standard properties with IDs 0xE28 and 0xE29
|
||||
|
|
|
@ -49,7 +49,7 @@ public final class TestMAPIAttributes {
|
|||
* Test counts
|
||||
*/
|
||||
@Test
|
||||
public void testCounts() throws Exception {
|
||||
void testCounts() throws Exception {
|
||||
// Message should have 54
|
||||
assertEquals(54, quick.getMessageMAPIAttributes().size());
|
||||
|
||||
|
@ -61,7 +61,7 @@ public final class TestMAPIAttributes {
|
|||
* Test various general ones
|
||||
*/
|
||||
@Test
|
||||
public void testBasics() throws Exception {
|
||||
void testBasics() throws Exception {
|
||||
// Try constructing two attributes
|
||||
byte[] data = new byte[]{
|
||||
// Level one, id 36867, type 6
|
||||
|
@ -130,7 +130,7 @@ public final class TestMAPIAttributes {
|
|||
* Test String, Date and RTF ones
|
||||
*/
|
||||
@Test
|
||||
public void testTyped() throws Exception {
|
||||
void testTyped() throws Exception {
|
||||
MAPIAttribute attr;
|
||||
|
||||
// String
|
||||
|
@ -173,7 +173,7 @@ public final class TestMAPIAttributes {
|
|||
* Check common ones via helper accessors
|
||||
*/
|
||||
@Test
|
||||
public void testCommon() throws Exception {
|
||||
void testCommon() throws Exception {
|
||||
assertEquals("This is a test message", quick.getSubject());
|
||||
|
||||
assertEquals("quick.doc", quick.getAttachments().get(0).getLongFilename());
|
||||
|
|
|
@ -51,7 +51,7 @@ public final class TestTNEFAttributes {
|
|||
* Test counts
|
||||
*/
|
||||
@Test
|
||||
public void testCounts() throws Exception {
|
||||
void testCounts() throws Exception {
|
||||
// The message should have 4 attributes
|
||||
assertEquals(4, quick.getMessageAttributes().size());
|
||||
|
||||
|
@ -65,7 +65,7 @@ public final class TestTNEFAttributes {
|
|||
* Test the basics
|
||||
*/
|
||||
@Test
|
||||
public void testBasics() throws Exception {
|
||||
void testBasics() throws Exception {
|
||||
// An int one
|
||||
assertEquals(
|
||||
0x010000,
|
||||
|
@ -128,7 +128,7 @@ public final class TestTNEFAttributes {
|
|||
* Test string based ones
|
||||
*/
|
||||
@Test
|
||||
public void testString() throws Exception {
|
||||
void testString() throws Exception {
|
||||
TNEFAttribute attr = quick.getAttachments().get(0).getAttribute(
|
||||
TNEFProperty.ID_ATTACHTITLE
|
||||
);
|
||||
|
@ -147,7 +147,7 @@ public final class TestTNEFAttributes {
|
|||
* Test date based ones
|
||||
*/
|
||||
@Test
|
||||
public void testDate() throws Exception {
|
||||
void testDate() throws Exception {
|
||||
TNEFAttribute attr = quick.getAttachments().get(0).getAttribute(
|
||||
TNEFProperty.ID_ATTACHMODIFYDATE
|
||||
);
|
||||
|
@ -176,7 +176,7 @@ public final class TestTNEFAttributes {
|
|||
* Test a bit of mapi
|
||||
*/
|
||||
@Test
|
||||
public void testMAPI() throws Exception {
|
||||
void testMAPI() throws Exception {
|
||||
// Message MAPI
|
||||
TNEFAttribute attr = quick.getMessageAttribute(
|
||||
TNEFProperty.ID_MAPIPROPERTIES
|
||||
|
@ -211,7 +211,7 @@ public final class TestTNEFAttributes {
|
|||
* Test common ones via helpers
|
||||
*/
|
||||
@Test
|
||||
public void testCommon() throws Exception {
|
||||
void testCommon() throws Exception {
|
||||
assertEquals("This is a test message", quick.getSubject());
|
||||
assertEquals("quick.doc", quick.getAttachments().get(0).getFilename());
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
public class TestHMEFContentsExtractor {
|
||||
@Test
|
||||
public void TestMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
POIDataSamples samples = POIDataSamples.getHMEFInstance();
|
||||
File message = samples.getFile("quick-winmail.dat");
|
||||
File outputDirectory = TempFile.createTempDirectory("quick-winmail-main");
|
||||
|
@ -58,7 +58,7 @@ public class TestHMEFContentsExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void TestExtractMessageBody_OutputStream() throws IOException {
|
||||
void testExtractMessageBody_OutputStream() throws IOException {
|
||||
POIDataSamples samples = POIDataSamples.getHMEFInstance();
|
||||
File winmailTNEFFile = samples.getFile("quick-winmail.dat");
|
||||
HMEFContentsExtractor extractor = new HMEFContentsExtractor(winmailTNEFFile);
|
||||
|
@ -72,7 +72,7 @@ public class TestHMEFContentsExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void TestExtractMessageBody_File() throws IOException {
|
||||
void testExtractMessageBody_File() throws IOException {
|
||||
POIDataSamples samples = POIDataSamples.getHMEFInstance();
|
||||
File winmailTNEFFile = samples.getFile("quick-winmail.dat");
|
||||
HMEFContentsExtractor extractor = new HMEFContentsExtractor(winmailTNEFFile);
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class TestHPBFDocument {
|
|||
private static final POIDataSamples _samples = POIDataSamples.getPublisherInstance();
|
||||
|
||||
@Test
|
||||
public void testOpen() throws IOException {
|
||||
void testOpen() throws IOException {
|
||||
InputStream is = _samples.openResourceAsStream("Sample.pub");
|
||||
HPBFDocument doc = new HPBFDocument(is);
|
||||
is.close();
|
||||
|
@ -40,7 +40,7 @@ public final class TestHPBFDocument {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBits() throws IOException {
|
||||
void testBits() throws IOException {
|
||||
InputStream is = _samples.openResourceAsStream("Sample.pub");
|
||||
HPBFDocument doc = new HPBFDocument(is);
|
||||
is.close();
|
||||
|
@ -59,6 +59,6 @@ public final class TestHPBFDocument {
|
|||
}
|
||||
|
||||
// TODO
|
||||
// public void testWrite() throws Exception {
|
||||
// void testWrite() throws Exception {
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public final class TestPublisherTextExtractor {
|
|||
"0123456789abcdef0123456789abcdef0123456789abcdef\n";
|
||||
|
||||
@Test
|
||||
public void testBasics() throws IOException {
|
||||
void testBasics() throws IOException {
|
||||
InputStream sample = _samples.openResourceAsStream("Sample.pub");
|
||||
HPBFDocument doc = new HPBFDocument(sample);
|
||||
PublisherTextExtractor ext = new PublisherTextExtractor(doc);
|
||||
|
@ -85,7 +85,7 @@ public final class TestPublisherTextExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testContents() throws IOException {
|
||||
void testContents() throws IOException {
|
||||
// Check this complicated file using POIFS
|
||||
InputStream sample = _samples.openResourceAsStream("Sample.pub");
|
||||
HPBFDocument docOPOIFS = new HPBFDocument(sample);
|
||||
|
@ -118,7 +118,7 @@ public final class TestPublisherTextExtractor {
|
|||
* Publisher 2007. Check they all agree.
|
||||
*/
|
||||
@Test
|
||||
public void testMultipleVersions() throws Exception {
|
||||
void testMultipleVersions() throws Exception {
|
||||
InputStream sample = _samples.openResourceAsStream("Sample.pub");
|
||||
HPBFDocument doc = new HPBFDocument(sample);
|
||||
PublisherTextExtractor ext = new PublisherTextExtractor(doc);
|
||||
|
@ -153,7 +153,7 @@ public final class TestPublisherTextExtractor {
|
|||
* to.
|
||||
*/
|
||||
@Test
|
||||
public void testWithHyperlinks() throws Exception {
|
||||
void testWithHyperlinks() throws Exception {
|
||||
InputStream linkAt = _samples.openResourceAsStream("LinkAt10.pub");
|
||||
HPBFDocument doc = new HPBFDocument(linkAt);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class TestEscherParts {
|
|||
private static final POIDataSamples _samples = POIDataSamples.getPublisherInstance();
|
||||
|
||||
@Test
|
||||
public void testBasics() throws IOException {
|
||||
void testBasics() throws IOException {
|
||||
InputStream is = _samples.openResourceAsStream("Sample.pub");
|
||||
HPBFDocument doc = new HPBFDocument(is);
|
||||
is.close();
|
||||
|
@ -50,7 +50,7 @@ public final class TestEscherParts {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testComplex() throws Exception {
|
||||
void testComplex() throws Exception {
|
||||
InputStream is = _samples.openResourceAsStream("SampleBrochure.pub");
|
||||
HPBFDocument doc1 = new HPBFDocument(is);
|
||||
is.close();
|
||||
|
|
|
@ -39,7 +39,7 @@ public final class TestQuillContents {
|
|||
private static final POIDataSamples _samples = POIDataSamples.getPublisherInstance();
|
||||
|
||||
@Test
|
||||
public void testBasics() throws IOException {
|
||||
void testBasics() throws IOException {
|
||||
HPBFDocument doc = new HPBFDocument(
|
||||
_samples.openResourceAsStream("Sample.pub")
|
||||
);
|
||||
|
@ -73,7 +73,7 @@ public final class TestQuillContents {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testText() throws IOException {
|
||||
void testText() throws IOException {
|
||||
HPBFDocument doc = new HPBFDocument(
|
||||
_samples.openResourceAsStream("Sample.pub")
|
||||
);
|
||||
|
@ -90,7 +90,7 @@ public final class TestQuillContents {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPLC() throws IOException {
|
||||
void testPLC() throws IOException {
|
||||
HPBFDocument doc = new HPBFDocument(
|
||||
_samples.openResourceAsStream("Simple.pub")
|
||||
);
|
||||
|
@ -154,7 +154,7 @@ public final class TestQuillContents {
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
@Test
|
||||
public void testComplexPLC() throws IOException {
|
||||
void testComplexPLC() throws IOException {
|
||||
HPBFDocument doc = new HPBFDocument(
|
||||
_samples.openResourceAsStream("Sample.pub")
|
||||
);
|
||||
|
@ -258,7 +258,7 @@ public final class TestQuillContents {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNoHyperlinks() throws IOException {
|
||||
void testNoHyperlinks() throws IOException {
|
||||
HPBFDocument doc = new HPBFDocument(
|
||||
_samples.openResourceAsStream("SampleNewsletter.pub")
|
||||
);
|
||||
|
@ -277,7 +277,7 @@ public final class TestQuillContents {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleHyperlink() throws IOException {
|
||||
void testSimpleHyperlink() throws IOException {
|
||||
HPBFDocument doc;
|
||||
QuillContents qc;
|
||||
Type12 hlBit;
|
||||
|
@ -329,7 +329,7 @@ public final class TestQuillContents {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testManyHyperlinks() throws IOException {
|
||||
void testManyHyperlinks() throws IOException {
|
||||
HPBFDocument doc;
|
||||
QuillContents qc;
|
||||
Type12 hlBit;
|
||||
|
@ -352,7 +352,7 @@ public final class TestQuillContents {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testHyperlinkDifferentVersions() throws IOException {
|
||||
void testHyperlinkDifferentVersions() throws IOException {
|
||||
HPBFDocument doc;
|
||||
QuillContents qc;
|
||||
Type12 hlBitA;
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class TestEncryptedFile {
|
|||
private static final POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testLoadNonEncrypted() throws IOException {
|
||||
void testLoadNonEncrypted() throws IOException {
|
||||
InputStream is = slTests.openResourceAsStream("basic_test_ppt_file.ppt");
|
||||
HSLFSlideShowImpl hss = new HSLFSlideShowImpl(is);
|
||||
assertNotNull(hss);
|
||||
|
@ -45,21 +45,21 @@ public final class TestEncryptedFile {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLoadEncrypted1() throws IOException {
|
||||
void testLoadEncrypted1() throws IOException {
|
||||
try (InputStream is = slTests.openResourceAsStream("Password_Protected-hello.ppt")) {
|
||||
assertThrows(EncryptedPowerPointFileException.class, () -> new HSLFSlideShowImpl(is).close());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadEncrypted2() throws IOException {
|
||||
void testLoadEncrypted2() throws IOException {
|
||||
try (InputStream is = slTests.openResourceAsStream("Password_Protected-np-hello.ppt")) {
|
||||
assertThrows(EncryptedPowerPointFileException.class, () -> new HSLFSlideShowImpl(is).close());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadEncrypted3() throws IOException {
|
||||
void testLoadEncrypted3() throws IOException {
|
||||
try (InputStream is = slTests.openResourceAsStream("Password_Protected-56-hello.ppt")) {
|
||||
assertThrows(EncryptedPowerPointFileException.class, () -> new HSLFSlideShowImpl(is).close());
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public final class TestPOIDocumentScratchpad {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadProperties() {
|
||||
void testReadProperties() {
|
||||
testReadPropertiesHelper(doc);
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ public final class TestPOIDocumentScratchpad {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadProperties2() {
|
||||
void testReadProperties2() {
|
||||
// Check again on the word one
|
||||
assertNotNull(doc2.getDocumentSummaryInformation());
|
||||
assertNotNull(doc2.getSummaryInformation());
|
||||
|
@ -88,7 +88,7 @@ public final class TestPOIDocumentScratchpad {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWriteProperties() throws IOException {
|
||||
void testWriteProperties() throws IOException {
|
||||
// Just check we can write them back out into a filesystem
|
||||
POIFSFileSystem outFS = new POIFSFileSystem();
|
||||
doc.writeProperties(outFS);
|
||||
|
@ -100,7 +100,7 @@ public final class TestPOIDocumentScratchpad {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWriteReadProperties() throws IOException {
|
||||
void testWriteReadProperties() throws IOException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
|
||||
// Write them out
|
||||
|
|
|
@ -68,7 +68,7 @@ public final class TestReWrite {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWritesOutTheSame() throws Exception {
|
||||
void testWritesOutTheSame() throws Exception {
|
||||
assertWritesOutTheSame(hssA, pfsA);
|
||||
assertWritesOutTheSame(hssB, pfsB);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public final class TestReWrite {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWithMacroStreams() throws IOException {
|
||||
void testWithMacroStreams() throws IOException {
|
||||
// Check that they're apparently the same
|
||||
assertSlideShowWritesOutTheSame(hssC, pfsC);
|
||||
|
||||
|
@ -148,7 +148,7 @@ public final class TestReWrite {
|
|||
* doesn't change things
|
||||
*/
|
||||
@Test
|
||||
public void testSlideShowWritesOutTheSame() throws Exception {
|
||||
void testSlideShowWritesOutTheSame() throws Exception {
|
||||
assertSlideShowWritesOutTheSame(hssA, pfsA);
|
||||
|
||||
// Some bug in StyleTextPropAtom rewriting means this will fail
|
||||
|
@ -192,7 +192,7 @@ public final class TestReWrite {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void test48593() throws IOException {
|
||||
void test48593() throws IOException {
|
||||
HSLFSlideShow ppt1 = new HSLFSlideShow();
|
||||
ppt1.createSlide();
|
||||
HSLFSlideShow ppt2 = HSLFTestDataSamples.writeOutAndReadBack(ppt1);
|
||||
|
|
|
@ -63,7 +63,7 @@ public final class TestReWriteSanity {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testUserEditAtomsRight() throws Exception {
|
||||
void testUserEditAtomsRight() throws Exception {
|
||||
// Write out to a byte array
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ss.write(baos);
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class TestRecordCounts {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSheetsCount() {
|
||||
void testSheetsCount() {
|
||||
// Top level
|
||||
Record[] r = ss.getRecords();
|
||||
|
||||
|
@ -60,7 +60,7 @@ public final class TestRecordCounts {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNotesCount() {
|
||||
void testNotesCount() {
|
||||
// Top level
|
||||
Record[] r = ss.getRecords();
|
||||
|
||||
|
@ -75,7 +75,7 @@ public final class TestRecordCounts {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSlideListWithTextCount() {
|
||||
void testSlideListWithTextCount() {
|
||||
// Second level
|
||||
Record[] rt = ss.getRecords();
|
||||
Record[] r = rt[0].getChildRecords();
|
||||
|
|
|
@ -103,7 +103,7 @@ public abstract class BasePPTIteratingTest {
|
|||
|
||||
@ParameterizedTest
|
||||
@MethodSource("files")
|
||||
public void testAllFiles(File file) throws Exception {
|
||||
void testAllFiles(File file) throws Exception {
|
||||
String fileName = file.getName();
|
||||
Class<? extends Throwable> t = null;
|
||||
if (EXCLUDED.containsKey(fileName)) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
|
||||
public class TestPPDrawingTextListing extends BasePPTIteratingTest {
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// calls System.exit(): PPDrawingTextListing.main(new String[0]);
|
||||
assertThrows(EmptyFileException.class, () -> PPDrawingTextListing.main(new String[]{"invalidfile"}));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
public class TestPPTXMLDump extends BasePPTIteratingTest {
|
||||
@Test
|
||||
public void testMain() throws Exception {
|
||||
void testMain() throws Exception {
|
||||
PPTXMLDump.main(new String[0]);
|
||||
|
||||
PPTXMLDump.main(new String[]{
|
||||
|
|
|
@ -44,7 +44,7 @@ public class TestSLWTListing extends BasePPTIteratingTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// calls System.exit(): SLWTListing.main(new String[0]);
|
||||
assertThrows(EmptyFileException.class, () -> SLWTListing.main(new String[]{"invalidfile"}));
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
|
||||
public class TestSLWTTextListing extends BasePPTIteratingTest {
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// calls System.exit(): SLWTTextListing.main(new String[0]);
|
||||
assertThrows(EmptyFileException.class, () -> SLWTTextListing.main(new String[]{"invalidfile"}));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
|
||||
public class TestSlideAndNotesAtomListing extends BasePPTIteratingTest {
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// calls System.exit(): SlideAndNotesAtomListing.main(new String[0]);
|
||||
SlideAndNotesAtomListing.main(new String[] {
|
||||
HSLFTestDataSamples.getSampleFile("slide_master.ppt").getAbsolutePath()
|
||||
|
|
|
@ -28,7 +28,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
|
||||
public class TestSlideIdListing extends BasePPTIteratingTest {
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// calls System.exit(): SlideIdListing.main(new String[0]);
|
||||
SlideIdListing.main(new String[] {
|
||||
HSLFTestDataSamples.getSampleFile("slide_master.ppt").getAbsolutePath()
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TestSlideShowDumper extends BasePPTIteratingTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// SlideShowDumper calls IOUtils.toByteArray(is), which would fail if a different size is defined
|
||||
IOUtils.setByteArrayMaxOverride(-1);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
public class TestSlideShowRecordDumper extends BasePPTIteratingTest {
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
SlideShowRecordDumper.main(new String[] {
|
||||
HSLFTestDataSamples.getSampleFile("slide_master.ppt").getAbsolutePath(),
|
||||
});
|
||||
|
|
|
@ -34,7 +34,7 @@ public class TestTextStyleListing extends BasePPTIteratingTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// calls System.exit(): TextStyleListing.main(new String[0]);
|
||||
assertThrows(EmptyFileException.class, () -> TextStyleListing.main(new String[]{"invalidfile"}));
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
|
||||
public class TestUserEditAndPersistListing extends BasePPTIteratingTest {
|
||||
@Test
|
||||
public void testMain() throws IOException {
|
||||
void testMain() throws IOException {
|
||||
// calls System.exit(): UserEditAndPersistListing.main(new String[0]);
|
||||
assertThrows(EmptyFileException.class, () -> UserEditAndPersistListing.main(new String[]{"invalidfile"}));
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public final class TestCruddyExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadAsVector() {
|
||||
void testReadAsVector() {
|
||||
// Extract the text from the file as a vector
|
||||
List<String> foundTextV = te.getTextAsVector();
|
||||
|
||||
|
@ -81,7 +81,7 @@ public final class TestCruddyExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadAsString() {
|
||||
void testReadAsString() {
|
||||
// Extract the text as a String
|
||||
String foundText = te.getTextAsString();
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadSheetText() throws IOException {
|
||||
void testReadSheetText() throws IOException {
|
||||
// Basic 2 page example
|
||||
try (SlideShowExtractor<?,?> ppe = openExtractor("basic_test_ppt_file.ppt")) {
|
||||
assertEquals(EXPECTED_PAGE1+EXPECTED_PAGE2, ppe.getText());
|
||||
|
@ -103,7 +103,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadNoteText() throws IOException {
|
||||
void testReadNoteText() throws IOException {
|
||||
// Basic 2 page example
|
||||
try (SlideShowExtractor<?,?> ppe = openExtractor("basic_test_ppt_file.ppt")) {
|
||||
ppe.setNotesByDefault(true);
|
||||
|
@ -125,7 +125,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadBoth() throws IOException {
|
||||
void testReadBoth() throws IOException {
|
||||
String[] slText = { EXPECTED_PAGE1, EXPECTED_PAGE2 };
|
||||
String[] ntText = { NOTES_PAGE1, NOTES_PAGE2 };
|
||||
|
||||
|
@ -149,7 +149,7 @@ public final class TestExtractor {
|
|||
* core record, we can still get the rest of the text out
|
||||
*/
|
||||
@Test
|
||||
public void testMissingCoreRecords() throws IOException {
|
||||
void testMissingCoreRecords() throws IOException {
|
||||
try (SlideShowExtractor<?,?> ppe = openExtractor("missing_core_records.ppt")) {
|
||||
ppe.setSlidesByDefault(true);
|
||||
ppe.setNotesByDefault(false);
|
||||
|
@ -170,7 +170,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExtractFromEmbeded() throws IOException {
|
||||
void testExtractFromEmbeded() throws IOException {
|
||||
try (final InputStream is = POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embeded.xls");
|
||||
final POIFSFileSystem fs = new POIFSFileSystem(is)) {
|
||||
final DirectoryNode root = fs.getRoot();
|
||||
|
@ -196,7 +196,7 @@ public final class TestExtractor {
|
|||
* A powerpoint file with embeded powerpoint files
|
||||
*/
|
||||
@Test
|
||||
public void testExtractFromOwnEmbeded() throws IOException {
|
||||
void testExtractFromOwnEmbeded() throws IOException {
|
||||
try (SlideShowExtractor<?,?> ppe = openExtractor("ppt_with_embeded.ppt")) {
|
||||
List<? extends ObjectShape<?,?>> shapes = ppe.getOLEShapes();
|
||||
assertEquals(6, shapes.size(), "Expected 6 ole shapes");
|
||||
|
@ -229,7 +229,7 @@ public final class TestExtractor {
|
|||
* A powerpoint file with embeded powerpoint files
|
||||
*/
|
||||
@Test
|
||||
public void test52991() throws IOException {
|
||||
void test52991() throws IOException {
|
||||
try (SlideShowExtractor<?,?> ppe = openExtractor("badzip.ppt")) {
|
||||
for (ObjectShape<?,?> shape : ppe.getOLEShapes()) {
|
||||
IOUtils.copy(shape.getObjectData().getInputStream(), new ByteArrayOutputStream());
|
||||
|
@ -241,7 +241,7 @@ public final class TestExtractor {
|
|||
* From bug #45543
|
||||
*/
|
||||
@Test
|
||||
public void testWithComments() throws IOException {
|
||||
void testWithComments() throws IOException {
|
||||
try (final SlideShowExtractor<?,?> ppe = openExtractor("WithComments.ppt")) {
|
||||
String text = ppe.getText();
|
||||
assertFalse(text.contains("This is a test comment"), "Comments not in by default");
|
||||
|
@ -269,7 +269,7 @@ public final class TestExtractor {
|
|||
* From bug #45537
|
||||
*/
|
||||
@Test
|
||||
public void testHeaderFooter() throws IOException {
|
||||
void testHeaderFooter() throws IOException {
|
||||
// With a header on the notes
|
||||
try (InputStream is = slTests.openResourceAsStream("45537_Header.ppt");
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(is)) {
|
||||
|
@ -304,7 +304,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSlideMasterText() throws IOException {
|
||||
void testSlideMasterText() throws IOException {
|
||||
String masterTitleText = "This is the Master Title";
|
||||
String masterRandomText = "This text comes from the Master Slide";
|
||||
String masterFooterText = "Footer from the master slide";
|
||||
|
@ -327,7 +327,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSlideMasterText2() throws IOException {
|
||||
void testSlideMasterText2() throws IOException {
|
||||
try (final SlideShowExtractor<?,?> ppe = openExtractor("bug62591.ppt")) {
|
||||
ppe.setMasterByDefault(true);
|
||||
String text = ppe.getText();
|
||||
|
@ -336,7 +336,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMasterText() throws IOException {
|
||||
void testMasterText() throws IOException {
|
||||
try (final SlideShowExtractor<?,?> ppe = openExtractor("master_text.ppt")) {
|
||||
// Initially not there
|
||||
String text = ppe.getText();
|
||||
|
@ -366,7 +366,7 @@ public final class TestExtractor {
|
|||
* Bug #54880 Chinese text not extracted properly
|
||||
*/
|
||||
@Test
|
||||
public void testChineseText() throws IOException {
|
||||
void testChineseText() throws IOException {
|
||||
try (final SlideShowExtractor<?,?> ppe = openExtractor("54880_chinese.ppt")) {
|
||||
String text = ppe.getText();
|
||||
|
||||
|
@ -390,7 +390,7 @@ public final class TestExtractor {
|
|||
*/
|
||||
@SuppressWarnings("resource")
|
||||
@Test
|
||||
public void testDifferentPOIFS() throws IOException {
|
||||
void testDifferentPOIFS() throws IOException {
|
||||
// Open the two filesystems
|
||||
File pptFile = slTests.getFile("basic_test_ppt_file.ppt");
|
||||
try (final POIFSFileSystem poifs = new POIFSFileSystem(pptFile, true)) {
|
||||
|
@ -403,7 +403,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTable() throws Exception {
|
||||
void testTable() throws Exception {
|
||||
try (SlideShowExtractor<?,?> ppe = openExtractor("54111.ppt")) {
|
||||
String text = ppe.getText();
|
||||
String target = "TH Cell 1\tTH Cell 2\tTH Cell 3\tTH Cell 4\n" +
|
||||
|
@ -426,7 +426,7 @@ public final class TestExtractor {
|
|||
|
||||
// bug 60003
|
||||
@Test
|
||||
public void testExtractMasterSlideFooterText() throws Exception {
|
||||
void testExtractMasterSlideFooterText() throws Exception {
|
||||
try (SlideShowExtractor<?,?> ppe = openExtractor("60003.ppt")) {
|
||||
ppe.setMasterByDefault(true);
|
||||
|
||||
|
@ -436,7 +436,7 @@ public final class TestExtractor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testExtractGroupedShapeText() throws Exception {
|
||||
void testExtractGroupedShapeText() throws Exception {
|
||||
try (final SlideShowExtractor<?,?> ppe = openExtractor("bug62092.ppt")) {
|
||||
final String text = ppe.getText();
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
|
|||
public final class TestFreeform {
|
||||
|
||||
@Test
|
||||
public void testClosedPath() {
|
||||
void testClosedPath() {
|
||||
|
||||
Path2D.Double path1 = new Path2D.Double();
|
||||
path1.moveTo(100, 100);
|
||||
|
@ -56,7 +56,7 @@ public final class TestFreeform {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLine() {
|
||||
void testLine() {
|
||||
|
||||
Path2D.Double path1 = new Path2D.Double(new Line2D.Double(100, 100, 200, 100));
|
||||
|
||||
|
@ -68,7 +68,7 @@ public final class TestFreeform {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRectangle() {
|
||||
void testRectangle() {
|
||||
|
||||
Path2D.Double path1 = new Path2D.Double(new Rectangle2D.Double(100, 100, 200, 50));
|
||||
|
||||
|
@ -84,7 +84,7 @@ public final class TestFreeform {
|
|||
* GEOMETRY__SEGMENTINFO is missing, see Bugzilla 54188
|
||||
*/
|
||||
@Test
|
||||
public void test54188() {
|
||||
void test54188() {
|
||||
|
||||
HSLFFreeformShape p = new HSLFFreeformShape();
|
||||
Path2D path = p.getPath();
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class TestHeadersFooters
|
|||
private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testRead() throws IOException {
|
||||
void testRead() throws IOException {
|
||||
InputStream is = _slTests.openResourceAsStream("headers_footers.ppt");
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(is);
|
||||
is.close();
|
||||
|
@ -95,7 +95,7 @@ public final class TestHeadersFooters
|
|||
* If Headers / Footers are not set, all the getters should return <code>false</code> or <code>null</code>
|
||||
*/
|
||||
@Test
|
||||
public void testReadNoHeadersFooters() throws Exception {
|
||||
void testReadNoHeadersFooters() throws Exception {
|
||||
InputStream is = _slTests.openResourceAsStream("basic_test_ppt_file.ppt");
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(is);
|
||||
is.close();
|
||||
|
@ -135,7 +135,7 @@ public final class TestHeadersFooters
|
|||
* Test extraction of headers / footers from PPTs saved in Office 2007
|
||||
*/
|
||||
@Test
|
||||
public void testRead2007() throws IOException {
|
||||
void testRead2007() throws IOException {
|
||||
InputStream is = _slTests.openResourceAsStream("headers_footers_2007.ppt");
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(is);
|
||||
is.close();
|
||||
|
@ -199,7 +199,7 @@ public final class TestHeadersFooters
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreateSlideFooters() throws IOException {
|
||||
void testCreateSlideFooters() throws IOException {
|
||||
HSLFSlideShow ppt1 = new HSLFSlideShow();
|
||||
HeadersFooters hdd = ppt1.getSlideHeadersFooters();
|
||||
hdd.setFootersText("My slide footer");
|
||||
|
@ -216,7 +216,7 @@ public final class TestHeadersFooters
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreateNotesFooters() throws IOException {
|
||||
void testCreateNotesFooters() throws IOException {
|
||||
HSLFSlideShow ppt1 = new HSLFSlideShow();
|
||||
HeadersFooters hdd = ppt1.getNotesHeadersFooters();
|
||||
hdd.setFootersText("My notes footer");
|
||||
|
|
|
@ -46,7 +46,7 @@ public final class TestHyperlink {
|
|||
private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testTextRunHyperlinks() throws Exception {
|
||||
void testTextRunHyperlinks() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("WithLinks.ppt"));
|
||||
|
||||
HSLFSlide slide = ppt.getSlides().get(0);
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
|
|||
public final class TestLine {
|
||||
|
||||
@Test
|
||||
public void testCreateLines() throws IOException {
|
||||
void testCreateLines() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow();
|
||||
|
||||
HSLFSlide slide = ppt.createSlide();
|
||||
|
|
|
@ -40,7 +40,7 @@ public final class TestMovieShape {
|
|||
private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow();
|
||||
|
||||
HSLFSlide slide = ppt.createSlide();
|
||||
|
|
|
@ -49,7 +49,7 @@ public final class TestOleEmbedding {
|
|||
private static final POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testOleEmbedding2003() throws IOException {
|
||||
void testOleEmbedding2003() throws IOException {
|
||||
HSLFSlideShowImpl slideShow = new HSLFSlideShowImpl(_slTests.openResourceAsStream("ole2-embedding-2003.ppt"));
|
||||
// Placeholder EMFs for clients that don't support the OLE components.
|
||||
List<HSLFPictureData> pictures = slideShow.getPictureData();
|
||||
|
@ -78,7 +78,7 @@ public final class TestOleEmbedding {
|
|||
|
||||
|
||||
@Test
|
||||
public void testOLEShape() throws IOException {
|
||||
void testOLEShape() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("ole2-embedding-2003.ppt"));
|
||||
|
||||
HSLFSlide slide = ppt.getSlides().get(0);
|
||||
|
@ -114,7 +114,7 @@ public final class TestOleEmbedding {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testEmbedding() throws IOException {
|
||||
void testEmbedding() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow();
|
||||
|
||||
File pict = POIDataSamples.getSlideShowInstance().getFile("clock.jpg");
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test;
|
|||
public final class TestPPFont {
|
||||
|
||||
@Test
|
||||
public void testCreate() throws IOException {
|
||||
void testCreate() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow();
|
||||
assertEquals(1, ppt.getNumberOfFonts());
|
||||
assertEquals("Arial", ppt.getFont(0).getTypeface());
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class TestSetBoldItalic {
|
|||
* and set some of the style attributes
|
||||
*/
|
||||
@Test
|
||||
public void testTextBoxWrite() throws Exception {
|
||||
void testTextBoxWrite() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow();
|
||||
HSLFSlide sl = ppt.createSlide();
|
||||
HSLFTextRun rt;
|
||||
|
|
|
@ -165,7 +165,7 @@ public final class TestShapes {
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
@Test
|
||||
public void testParagraphs() throws IOException {
|
||||
void testParagraphs() throws IOException {
|
||||
HSLFSlideShow ss = new HSLFSlideShow();
|
||||
HSLFSlide slide = ss.createSlide();
|
||||
HSLFTextBox shape = new HSLFTextBox();
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class TestSheet {
|
|||
* For each ppt in the test directory check that all sheets are properly initialized
|
||||
*/
|
||||
@Test
|
||||
public void testSheet() throws Exception {
|
||||
void testSheet() throws Exception {
|
||||
String[] tests = {"SampleShow.ppt", "backgrounds.ppt", "text_shapes.ppt", "pictures.ppt"};
|
||||
for (String file : tests) {
|
||||
try {
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class TestSlideChangeNotes {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetToNone() {
|
||||
void testSetToNone() {
|
||||
HSLFSlide slideOne = ss.getSlides().get(0);
|
||||
SlideAtom sa = slideOne.getSlideRecord().getSlideAtom();
|
||||
|
||||
|
@ -53,7 +53,7 @@ public final class TestSlideChangeNotes {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSetToSomething() {
|
||||
void testSetToSomething() {
|
||||
HSLFSlide slideOne = ss.getSlides().get(0);
|
||||
HSLFNotes notesOne = ss.getNotes().get(1);
|
||||
SlideAtom sa = slideOne.getSlideRecord().getSlideAtom();
|
||||
|
|
|
@ -56,7 +56,7 @@ public final class TestSlideMaster {
|
|||
* Check we can read their attributes.
|
||||
*/
|
||||
@Test
|
||||
public void testSlideMaster() throws IOException {
|
||||
void testSlideMaster() throws IOException {
|
||||
final HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt"));
|
||||
|
||||
final Environment env = ppt.getDocumentRecord().getEnvironment();
|
||||
|
@ -108,7 +108,7 @@ public final class TestSlideMaster {
|
|||
* Test we can read default text attributes for a title master sheet
|
||||
*/
|
||||
@Test
|
||||
public void testTitleMasterTextAttributes() throws IOException {
|
||||
void testTitleMasterTextAttributes() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt"));
|
||||
assertEquals(1, ppt.getTitleMasters().size());
|
||||
|
||||
|
@ -131,7 +131,7 @@ public final class TestSlideMaster {
|
|||
* Slide 3 has title layout and follows the TitleMaster. Verify that.
|
||||
*/
|
||||
@Test
|
||||
public void testTitleMaster() throws IOException {
|
||||
void testTitleMaster() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt"));
|
||||
HSLFSlide slide = ppt.getSlides().get(2);
|
||||
HSLFMasterSheet masterSheet = slide.getMasterSheet();
|
||||
|
@ -162,7 +162,7 @@ public final class TestSlideMaster {
|
|||
* If a style attribute is not set ensure it is read from the master
|
||||
*/
|
||||
@Test
|
||||
public void testMasterAttributes() throws Exception {
|
||||
void testMasterAttributes() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt"));
|
||||
List<HSLFSlide> slide = ppt.getSlides();
|
||||
assertEquals(3, slide.size());
|
||||
|
@ -211,7 +211,7 @@ public final class TestSlideMaster {
|
|||
* Check we can dynamically assign a slide master to a slide.
|
||||
*/
|
||||
@Test
|
||||
public void testChangeSlideMaster() throws IOException {
|
||||
void testChangeSlideMaster() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt"));
|
||||
List<HSLFSlideMaster> master = ppt.getSlideMasters();
|
||||
List<HSLFSlide> slide = ppt.getSlides();
|
||||
|
@ -248,7 +248,7 @@ public final class TestSlideMaster {
|
|||
* (typical for the "bullted body" placeholder)
|
||||
*/
|
||||
@Test
|
||||
public void testIndentation() throws IOException {
|
||||
void testIndentation() throws IOException {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("slide_master.ppt"));
|
||||
HSLFSlide slide = ppt.getSlides().get(0);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class TestSlides {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void testAddSlides1() throws Exception {
|
||||
void testAddSlides1() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(new HSLFSlideShowImpl( TestSlides.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt") ));
|
||||
assertTrue(ppt.getSlides().isEmpty());
|
||||
|
||||
|
@ -65,7 +65,7 @@ public final class TestSlides {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void testAddSlides2() throws Exception {
|
||||
void testAddSlides2() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(new HSLFSlideShowImpl( TestSlides.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt") ));
|
||||
assertTrue(ppt.getSlides().isEmpty());
|
||||
|
||||
|
@ -95,7 +95,7 @@ public final class TestSlides {
|
|||
* @throws Exception
|
||||
*/
|
||||
@Test
|
||||
public void testAddSlides3() throws Exception {
|
||||
void testAddSlides3() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(new HSLFSlideShowImpl( TestSlides.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt") ));
|
||||
assertTrue(ppt.getSlides().isEmpty());
|
||||
|
||||
|
@ -143,7 +143,7 @@ public final class TestSlides {
|
|||
* Add slides to ppt which already has two slides
|
||||
*/
|
||||
@Test
|
||||
public void testAddSlides2to3() throws Exception {
|
||||
void testAddSlides2to3() throws Exception {
|
||||
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public final class TestTable {
|
|||
* Test that ShapeFactory works properly and returns <code>Table</code>
|
||||
*/
|
||||
@Test
|
||||
public void testShapeFactory() throws IOException {
|
||||
void testShapeFactory() throws IOException {
|
||||
final int noColumns, noRows;
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
try (HSLFSlideShow ppt = new HSLFSlideShow()) {
|
||||
|
@ -89,7 +89,7 @@ public final class TestTable {
|
|||
* Error constructing Table when rownum=1
|
||||
*/
|
||||
@Test
|
||||
public void test45889() throws IOException {
|
||||
void test45889() throws IOException {
|
||||
try (HSLFSlideShow ppt = new HSLFSlideShow()) {
|
||||
HSLFSlide slide = ppt.createSlide();
|
||||
List<HSLFShape> shapes;
|
||||
|
@ -110,7 +110,7 @@ public final class TestTable {
|
|||
|
||||
// Table(rownum, colnum) must throw IllegalArgumentException if any of the arguments is less than 1
|
||||
@Test
|
||||
public void testIllegalRowCnstruction() throws IOException {
|
||||
void testIllegalRowCnstruction() throws IOException {
|
||||
try (HSLFSlideShow ppt = new HSLFSlideShow()) {
|
||||
HSLFSlide slide = ppt.createSlide();
|
||||
assertThrows(IllegalArgumentException.class, () -> slide.createTable(0, 5));
|
||||
|
@ -119,7 +119,7 @@ public final class TestTable {
|
|||
|
||||
// Table(rownum, colnum) must throw IllegalArgumentException if any of the arguments is less than 1
|
||||
@Test
|
||||
public void testIllegalColConstruction() throws IOException {
|
||||
void testIllegalColConstruction() throws IOException {
|
||||
try (HSLFSlideShow ppt = new HSLFSlideShow()) {
|
||||
HSLFSlide slide = ppt.createSlide();
|
||||
assertThrows(IllegalArgumentException.class, () -> slide.createTable(5, 0));
|
||||
|
@ -131,7 +131,7 @@ public final class TestTable {
|
|||
* when the table is positioned with its top at -1
|
||||
*/
|
||||
@Test
|
||||
public void test57820() throws IOException {
|
||||
void test57820() throws IOException {
|
||||
try (SlideShow<?,?> ppt = new HSLFSlideShow(_slTests.openResourceAsStream("bug57820-initTableNullRefrenceException.ppt"))) {
|
||||
|
||||
List<? extends Slide<?, ?>> slides = ppt.getSlides();
|
||||
|
|
|
@ -55,7 +55,7 @@ public final class TestTextRunReWrite {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWritesOutTheSameNonRich() throws IOException {
|
||||
void testWritesOutTheSameNonRich() throws IOException {
|
||||
// Ensure the text lengths are as we'd expect to start with
|
||||
assertEquals(1, ss.getSlides().size());
|
||||
assertEquals(2, ss.getSlides().get(0).getTextParagraphs().size());
|
||||
|
@ -117,7 +117,7 @@ public final class TestTextRunReWrite {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWritesOutTheSameRich() throws IOException {
|
||||
void testWritesOutTheSameRich() throws IOException {
|
||||
// Grab the first text run on the first sheet
|
||||
List<HSLFTextParagraph> tr1 = ss.getSlides().get(0).getTextParagraphs().get(0);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class TestAnimationInfoAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
AnimationInfoAtom record = new AnimationInfoAtom(data, 0, data.length);
|
||||
assertEquals(RecordTypes.AnimationInfoAtom.typeID, record.getRecordType());
|
||||
assertTrue(record.getFlag(AnimationInfoAtom.Automatic));
|
||||
|
@ -64,7 +64,7 @@ public final class TestAnimationInfoAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
AnimationInfoAtom record = new AnimationInfoAtom(data, 0, data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -74,7 +74,7 @@ public final class TestAnimationInfoAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewRecord() throws Exception {
|
||||
void testNewRecord() throws Exception {
|
||||
AnimationInfoAtom record = new AnimationInfoAtom();
|
||||
record.setDimColor(0x07000000);
|
||||
record.setOrderID(2);
|
||||
|
|
|
@ -38,7 +38,7 @@ public final class TestCString {
|
|||
0x65, 0, 0x6E, 0, 0x74, 0, 0x73, 0 };
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
CString ca = new CString(data_a, 0, data_a.length);
|
||||
assertEquals(4026L, ca.getRecordType());
|
||||
CString cb = new CString(data_b, 0, data_a.length);
|
||||
|
@ -46,7 +46,7 @@ public final class TestCString {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCount() {
|
||||
void testCount() {
|
||||
CString ca = new CString(data_a, 0, data_a.length);
|
||||
assertEquals(0, ca.getOptions());
|
||||
CString cb = new CString(data_b, 0, data_a.length);
|
||||
|
@ -57,7 +57,7 @@ public final class TestCString {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testText() {
|
||||
void testText() {
|
||||
CString ca = new CString(data_a, 0, data_a.length);
|
||||
assertEquals("Hogwarts", ca.getText());
|
||||
CString cb = new CString(data_b, 0, data_a.length);
|
||||
|
@ -68,7 +68,7 @@ public final class TestCString {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
CString ca = new CString(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ca.writeOut(baos);
|
||||
|
@ -92,7 +92,7 @@ public final class TestCString {
|
|||
|
||||
// Turn data_a into data_b
|
||||
@Test
|
||||
public void testChange() throws Exception {
|
||||
void testChange() throws Exception {
|
||||
CString ca = new CString(data_a, 0, data_a.length);
|
||||
ca.setText("Comments");
|
||||
ca.setOptions(0x10);
|
||||
|
|
|
@ -37,13 +37,13 @@ public final class TestColorSchemeAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
ColorSchemeAtom csa = new ColorSchemeAtom(data_a,0,data_a.length);
|
||||
assertEquals(2032L, csa.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToRGB() {
|
||||
void testToRGB() {
|
||||
byte[] rgb = ColorSchemeAtom.splitRGB(3669760);
|
||||
|
||||
assertEquals(3,rgb.length);
|
||||
|
@ -53,7 +53,7 @@ public final class TestColorSchemeAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFromRGB() {
|
||||
void testFromRGB() {
|
||||
byte[] rgb_a = new byte[] { 0, 255-256, 55 };
|
||||
byte[] rgb_b = new byte[] { 255-256, 127, 79 };
|
||||
|
||||
|
@ -65,7 +65,7 @@ public final class TestColorSchemeAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRGBs() {
|
||||
void testRGBs() {
|
||||
ColorSchemeAtom csa = new ColorSchemeAtom(data_a,0,data_a.length);
|
||||
|
||||
assertEquals( 16777215 , csa.getBackgroundColourRGB() );
|
||||
|
@ -79,7 +79,7 @@ public final class TestColorSchemeAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ColorSchemeAtom csa = new ColorSchemeAtom(data_a,0,data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
csa.writeOut(baos);
|
||||
|
|
|
@ -100,26 +100,26 @@ public final class TestComment2000 {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
Comment2000 ca = new Comment2000(data_a, 0, data_a.length);
|
||||
assertEquals(12000L, ca.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAuthor() {
|
||||
void testAuthor() {
|
||||
Comment2000 ca = new Comment2000(data_a, 0, data_a.length);
|
||||
assertEquals("Dumbledore", ca.getAuthor());
|
||||
assertEquals("D", ca.getAuthorInitials());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testText() {
|
||||
void testText() {
|
||||
Comment2000 ca = new Comment2000(data_a, 0, data_a.length);
|
||||
assertEquals("Yes, they certainly are, aren't they!", ca.getText());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCommentAtom() throws Exception {
|
||||
void testCommentAtom() throws Exception {
|
||||
Comment2000 ca = new Comment2000(data_a, 0, data_a.length);
|
||||
Comment2000Atom c2a = ca.getComment2000Atom();
|
||||
|
||||
|
@ -131,7 +131,7 @@ public final class TestComment2000 {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCommentAtomB() throws Exception {
|
||||
void testCommentAtomB() throws Exception {
|
||||
Comment2000 cb = new Comment2000(data_b, 0, data_b.length);
|
||||
Comment2000Atom c2b = cb.getComment2000Atom();
|
||||
|
||||
|
@ -143,7 +143,7 @@ public final class TestComment2000 {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
Comment2000 ca = new Comment2000(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ca.writeOut(baos);
|
||||
|
@ -157,7 +157,7 @@ public final class TestComment2000 {
|
|||
|
||||
// Change a few things
|
||||
@Test
|
||||
public void testChange() throws Exception {
|
||||
void testChange() throws Exception {
|
||||
Comment2000 ca = new Comment2000(data_a, 0, data_a.length);
|
||||
Comment2000 cb = new Comment2000(data_b, 0, data_b.length);
|
||||
Comment2000 cn = new Comment2000();
|
||||
|
@ -223,7 +223,7 @@ public final class TestComment2000 {
|
|||
* A Comment2000 records with missing commentTextAtom
|
||||
*/
|
||||
@Test
|
||||
public void testBug44770() {
|
||||
void testBug44770() {
|
||||
byte[] data = {
|
||||
0x0F, 0x00, (byte)0xE0, 0x2E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0xBA, 0x0F,
|
||||
0x08, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x45, 0x00, 0x53, 0x00, 0x53, 0x00, 0x20,
|
||||
|
|
|
@ -60,13 +60,13 @@ public final class TestComment2000Atom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length);
|
||||
assertEquals(12001l, ca.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDate() throws Exception {
|
||||
void testGetDate() throws Exception {
|
||||
Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length);
|
||||
Comment2000Atom cb = new Comment2000Atom(data_b, 0, data_b.length);
|
||||
|
||||
|
@ -80,7 +80,7 @@ public final class TestComment2000Atom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetNums() {
|
||||
void testGetNums() {
|
||||
Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length);
|
||||
Comment2000Atom cb = new Comment2000Atom(data_b, 0, data_b.length);
|
||||
|
||||
|
@ -91,7 +91,7 @@ public final class TestComment2000Atom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetPos() {
|
||||
void testGetPos() {
|
||||
Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length);
|
||||
Comment2000Atom cb = new Comment2000Atom(data_b, 0, data_b.length);
|
||||
|
||||
|
@ -105,7 +105,7 @@ public final class TestComment2000Atom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ca.writeOut(baos);
|
||||
|
@ -119,7 +119,7 @@ public final class TestComment2000Atom {
|
|||
|
||||
// Create A from scratch
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
Comment2000Atom a = new Comment2000Atom();
|
||||
|
||||
// Set number, x and y
|
||||
|
@ -144,7 +144,7 @@ public final class TestComment2000Atom {
|
|||
|
||||
// Try to turn a into b
|
||||
@Test
|
||||
public void testChange() throws Exception {
|
||||
void testChange() throws Exception {
|
||||
Comment2000Atom ca = new Comment2000Atom(data_a, 0, data_a.length);
|
||||
|
||||
// Change the number
|
||||
|
|
|
@ -54,13 +54,13 @@ public final class TestDocument {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
Document dr = getDocRecord();
|
||||
assertEquals(1000, dr.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChildRecords() {
|
||||
void testChildRecords() {
|
||||
Document dr = getDocRecord();
|
||||
assertNotNull(dr.getDocumentAtom());
|
||||
|
||||
|
@ -74,7 +74,7 @@ public final class TestDocument {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testEnvironment() {
|
||||
void testEnvironment() {
|
||||
Document dr = getDocRecord();
|
||||
Environment env = dr.getEnvironment();
|
||||
|
||||
|
|
|
@ -39,13 +39,13 @@ public final class TestDocumentAtom {
|
|||
1, 0, 0, 0, 0, 0, 0, 1 };
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
|
||||
assertEquals(1001l, da.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSizeAndZoom() {
|
||||
void testSizeAndZoom() {
|
||||
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
|
||||
assertEquals(5760L, da.getSlideSizeX());
|
||||
assertEquals(4320L, da.getSlideSizeY());
|
||||
|
@ -57,21 +57,21 @@ public final class TestDocumentAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testMasterPersist() {
|
||||
void testMasterPersist() {
|
||||
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
|
||||
assertEquals(2L, da.getNotesMasterPersist());
|
||||
assertEquals(0L, da.getHandoutMasterPersist());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSlideDetails() {
|
||||
void testSlideDetails() {
|
||||
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
|
||||
assertEquals(1, da.getFirstSlideNum());
|
||||
assertEquals(0, da.getSlideSizeType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBooleans() {
|
||||
void testBooleans() {
|
||||
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
|
||||
assertFalse(da.getSaveWithFonts());
|
||||
assertFalse(da.getOmitTitlePlace());
|
||||
|
@ -80,7 +80,7 @@ public final class TestDocumentAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
da.writeOut(baos);
|
||||
|
|
|
@ -72,7 +72,7 @@ public final class TestExControl {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
ExControl record = new ExControl(data, 0, data.length);
|
||||
assertEquals(RecordTypes.ExControl.typeID, record.getRecordType());
|
||||
|
||||
|
@ -91,7 +91,7 @@ public final class TestExControl {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ExControl record = new ExControl(data, 0, data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -99,7 +99,7 @@ public final class TestExControl {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewRecord() throws Exception {
|
||||
void testNewRecord() throws Exception {
|
||||
ExControl record = new ExControl();
|
||||
ExControlAtom ctrl = record.getExControlAtom();
|
||||
ctrl.setSlideId(256);
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
|
|||
*/
|
||||
public final class TestExHyperlink {
|
||||
@Test
|
||||
public void testReadWrite() throws IOException {
|
||||
void testReadWrite() throws IOException {
|
||||
// From a real file
|
||||
byte[] exHyperlinkBytes = org.apache.poi.poifs.storage.RawDataUtil.decompress(
|
||||
"H4sIAAAAAAAAAONnuM6/ggEELvOzAElmMHsXvxuQzGAoAcICBisGfSDMYkhkyAbi"+
|
||||
|
@ -59,7 +59,7 @@ public final class TestExHyperlink {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRealFile() throws IOException {
|
||||
void testRealFile() throws IOException {
|
||||
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
|
||||
HSLFSlideShowImpl hss = new HSLFSlideShowImpl(slTests.openResourceAsStream("WithLinks.ppt"));
|
||||
HSLFSlideShow ss = new HSLFSlideShow(hss);
|
||||
|
|
|
@ -40,13 +40,13 @@ public class TestExHyperlinkAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length);
|
||||
assertEquals(4051L, eha.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetNumber() {
|
||||
void testGetNumber() {
|
||||
ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length);
|
||||
ExHyperlinkAtom ehb = new ExHyperlinkAtom(data_b, 0, data_b.length);
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class TestExHyperlinkAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
eha.writeOut(baos);
|
||||
|
@ -64,7 +64,7 @@ public class TestExHyperlinkAtom {
|
|||
|
||||
// Create A from scratch
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
ExHyperlinkAtom eha = new ExHyperlinkAtom();
|
||||
|
||||
// Set value
|
||||
|
@ -78,7 +78,7 @@ public class TestExHyperlinkAtom {
|
|||
|
||||
// Try to turn a into b
|
||||
@Test
|
||||
public void testChange() throws Exception {
|
||||
void testChange() throws Exception {
|
||||
ExHyperlinkAtom eha = new ExHyperlinkAtom(data_a, 0, data_a.length);
|
||||
|
||||
// Change the number
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class TestExMediaAtom {
|
|||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
ExMediaAtom record = new ExMediaAtom(data, 0, data.length);
|
||||
assertEquals(RecordTypes.ExMediaAtom.typeID, record.getRecordType());
|
||||
|
||||
|
@ -48,7 +48,7 @@ public final class TestExMediaAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ExMediaAtom record = new ExMediaAtom(data, 0, data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -58,7 +58,7 @@ public final class TestExMediaAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewRecord() throws Exception {
|
||||
void testNewRecord() throws Exception {
|
||||
ExMediaAtom ref = new ExMediaAtom(data, 0, data.length);
|
||||
assertEquals(0, ref.getMask()); //
|
||||
|
||||
|
@ -76,7 +76,7 @@ public final class TestExMediaAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFlags() {
|
||||
void testFlags() {
|
||||
ExMediaAtom record = new ExMediaAtom();
|
||||
|
||||
//in a new record all the bits are 0
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
|
|||
*/
|
||||
public class TestExObjList {
|
||||
@Test
|
||||
public void testRealFile() throws Exception {
|
||||
void testRealFile() throws Exception {
|
||||
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
|
||||
HSLFSlideShow ss = new HSLFSlideShow(slTests.openResourceAsStream("WithLinks.ppt"));
|
||||
|
||||
|
|
|
@ -40,13 +40,13 @@ public class TestExObjListAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length);
|
||||
BaseTestNumeric.assertDouble(1034L, eoa.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetSeed() {
|
||||
void testGetSeed() {
|
||||
ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length);
|
||||
ExObjListAtom eob = new ExObjListAtom(data_b, 0, data_b.length);
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class TestExObjListAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
eoa.writeOut(baos);
|
||||
|
@ -64,7 +64,7 @@ public class TestExObjListAtom {
|
|||
|
||||
// Create A from scratch
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
ExObjListAtom eoa = new ExObjListAtom();
|
||||
|
||||
// Set seed
|
||||
|
@ -78,7 +78,7 @@ public class TestExObjListAtom {
|
|||
|
||||
// Try to turn a into b
|
||||
@Test
|
||||
public void testChange() throws Exception {
|
||||
void testChange() throws Exception {
|
||||
ExObjListAtom eoa = new ExObjListAtom(data_a, 0, data_a.length);
|
||||
|
||||
// Change the number
|
||||
|
|
|
@ -35,7 +35,7 @@ public final class TestExOleObjAtom {
|
|||
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, (byte)0x96, 0x13, 0x00 };
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
ExOleObjAtom record = new ExOleObjAtom(data, 0, data.length);
|
||||
assertEquals(RecordTypes.ExOleObjAtom.typeID, record.getRecordType());
|
||||
|
||||
|
@ -48,7 +48,7 @@ public final class TestExOleObjAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ExOleObjAtom record = new ExOleObjAtom(data, 0, data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -56,7 +56,7 @@ public final class TestExOleObjAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewRecord() throws Exception {
|
||||
void testNewRecord() throws Exception {
|
||||
ExOleObjAtom record = new ExOleObjAtom();
|
||||
record.setDrawAspect(ExOleObjAtom.DRAW_ASPECT_VISIBLE);
|
||||
record.setType(ExOleObjAtom.TYPE_CONTROL);
|
||||
|
|
|
@ -53,7 +53,7 @@ public final class TestExOleObjStg {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRead() throws Exception {
|
||||
void testRead() throws Exception {
|
||||
ExOleObjStg record = new ExOleObjStg(data, 0, data.length);
|
||||
assertEquals(RecordTypes.ExOleObjStg.typeID, record.getRecordType());
|
||||
|
||||
|
@ -68,7 +68,7 @@ public final class TestExOleObjStg {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ExOleObjStg record = new ExOleObjStg(data, 0, data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -78,7 +78,7 @@ public final class TestExOleObjStg {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewRecord() throws Exception {
|
||||
void testNewRecord() throws Exception {
|
||||
ExOleObjStg src = new ExOleObjStg(data, 0, data.length);
|
||||
byte[] oledata = readAll(src.getData());
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public final class TestExVideoContainer {
|
|||
0x6D, 0x00, 0x70, 0x00, 0x67, 0x00};
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
ExVideoContainer record = new ExVideoContainer(data, 0, data.length);
|
||||
assertEquals(RecordTypes.ExVideoContainer.typeID, record.getRecordType());
|
||||
|
||||
|
@ -68,7 +68,7 @@ public final class TestExVideoContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
ExVideoContainer record = new ExVideoContainer(data, 0, data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -76,7 +76,7 @@ public final class TestExVideoContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewRecord() throws Exception {
|
||||
void testNewRecord() throws Exception {
|
||||
ExVideoContainer record = new ExVideoContainer();
|
||||
record.getExMediaAtom().setObjectId(1);
|
||||
record.getPathAtom().setText("D:\\projects\\SchulerAG\\mcom_v_1_0_4\\view\\data\\tests\\images\\cards.mpg");
|
||||
|
|
|
@ -51,7 +51,7 @@ public final class TestFontCollection {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFonts() {
|
||||
void testFonts() {
|
||||
FontCollection fonts = new FontCollection(data, 0, data.length);
|
||||
Record[] child = fonts.getChildRecords();
|
||||
assertEquals(child.length, 1);
|
||||
|
@ -61,7 +61,7 @@ public final class TestFontCollection {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testAddFont() {
|
||||
void testAddFont() {
|
||||
FontCollection fonts = new FontCollection(data, 0, data.length);
|
||||
HSLFFontInfo fi = fonts.addFont(HSLFFontInfoPredefined.TIMES_NEW_ROMAN);
|
||||
assertEquals((int)fi.getIndex(), 0);
|
||||
|
@ -85,7 +85,7 @@ public final class TestFontCollection {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
FontCollection fonts = new FontCollection(data, 0, data.length);
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
fonts.writeOut(out);
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class TestHeadersFootersAtom {
|
|||
0x00, 0x00, 0x23, 0x00 };
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
HeadersFootersAtom record = new HeadersFootersAtom(data, 0, data.length);
|
||||
assertEquals(RecordTypes.HeadersFootersAtom.typeID, record.getRecordType());
|
||||
|
||||
|
@ -53,7 +53,7 @@ public final class TestHeadersFootersAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
HeadersFootersAtom record = new HeadersFootersAtom(data, 0, data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -61,7 +61,7 @@ public final class TestHeadersFootersAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewRecord() throws Exception {
|
||||
void testNewRecord() throws Exception {
|
||||
HeadersFootersAtom record = new HeadersFootersAtom();
|
||||
record.setFlag(HeadersFootersAtom.fHasDate, true);
|
||||
record.setFlag(HeadersFootersAtom.fHasTodayDate, true);
|
||||
|
@ -73,7 +73,7 @@ public final class TestHeadersFootersAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFlags() {
|
||||
void testFlags() {
|
||||
HeadersFootersAtom record = new HeadersFootersAtom();
|
||||
|
||||
//in a new record all the bits are 0
|
||||
|
|
|
@ -54,7 +54,7 @@ public final class TestHeadersFootersContainer {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testReadSlideHeadersFootersContainer() {
|
||||
void testReadSlideHeadersFootersContainer() {
|
||||
HeadersFootersContainer record = new HeadersFootersContainer(slideData, 0, slideData.length);
|
||||
assertEquals(RecordTypes.HeadersFooters.typeID, record.getRecordType());
|
||||
assertEquals(HeadersFootersContainer.SlideHeadersFootersContainer, record.getOptions());
|
||||
|
@ -74,7 +74,7 @@ public final class TestHeadersFootersContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWriteSlideHeadersFootersContainer() throws Exception {
|
||||
void testWriteSlideHeadersFootersContainer() throws Exception {
|
||||
HeadersFootersContainer record = new HeadersFootersContainer(slideData, 0, slideData.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -82,7 +82,7 @@ public final class TestHeadersFootersContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewSlideHeadersFootersContainer() throws Exception {
|
||||
void testNewSlideHeadersFootersContainer() throws Exception {
|
||||
HeadersFootersContainer record = new HeadersFootersContainer(HeadersFootersContainer.SlideHeadersFootersContainer);
|
||||
|
||||
assertNotNull(record.getHeadersFootersAtom());
|
||||
|
@ -106,7 +106,7 @@ public final class TestHeadersFootersContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReadNotesHeadersFootersContainer() {
|
||||
void testReadNotesHeadersFootersContainer() {
|
||||
HeadersFootersContainer record = new HeadersFootersContainer(notesData, 0, notesData.length);
|
||||
assertEquals(RecordTypes.HeadersFooters.typeID, record.getRecordType());
|
||||
assertEquals(HeadersFootersContainer.NotesHeadersFootersContainer, record.getOptions());
|
||||
|
@ -127,7 +127,7 @@ public final class TestHeadersFootersContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWriteNotesHeadersFootersContainer() throws Exception {
|
||||
void testWriteNotesHeadersFootersContainer() throws Exception {
|
||||
HeadersFootersContainer record = new HeadersFootersContainer(notesData, 0, notesData.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
record.writeOut(baos);
|
||||
|
@ -135,7 +135,7 @@ public final class TestHeadersFootersContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNewNotesHeadersFootersContainer() throws Exception {
|
||||
void testNewNotesHeadersFootersContainer() throws Exception {
|
||||
HeadersFootersContainer record = new HeadersFootersContainer(HeadersFootersContainer.NotesHeadersFootersContainer);
|
||||
|
||||
assertNotNull(record.getHeadersFootersAtom());
|
||||
|
|
|
@ -41,13 +41,13 @@ public class TestInteractiveInfo {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
InteractiveInfo ii = new InteractiveInfo(data_a, 0, data_a.length);
|
||||
assertEquals(4082, ii.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetChildDetails() {
|
||||
void testGetChildDetails() {
|
||||
InteractiveInfo ii = new InteractiveInfo(data_a, 0, data_a.length);
|
||||
InteractiveInfoAtom ia = ii.getInteractiveInfoAtom();
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class TestInteractiveInfo {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
InteractiveInfo ii = new InteractiveInfo(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ii.writeOut(baos);
|
||||
|
@ -64,7 +64,7 @@ public class TestInteractiveInfo {
|
|||
|
||||
// Create A from scratch
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
InteractiveInfo ii = new InteractiveInfo();
|
||||
InteractiveInfoAtom ia = ii.getInteractiveInfoAtom();
|
||||
|
||||
|
|
|
@ -42,13 +42,13 @@ public class TestInteractiveInfoAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
assertEquals(4083L, ia.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetNumber() {
|
||||
void testGetNumber() {
|
||||
InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
InteractiveInfoAtom ib = new InteractiveInfoAtom(data_b, 0, data_b.length);
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class TestInteractiveInfoAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testGetRest() {
|
||||
void testGetRest() {
|
||||
InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
InteractiveInfoAtom ib = new InteractiveInfoAtom(data_b, 0, data_b.length);
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class TestInteractiveInfoAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ia.writeOut(baos);
|
||||
|
@ -81,7 +81,7 @@ public class TestInteractiveInfoAtom {
|
|||
|
||||
// Create A from scratch
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
InteractiveInfoAtom ia = new InteractiveInfoAtom();
|
||||
|
||||
// Set values
|
||||
|
@ -98,7 +98,7 @@ public class TestInteractiveInfoAtom {
|
|||
|
||||
// Try to turn a into b
|
||||
@Test
|
||||
public void testChange() throws Exception {
|
||||
void testChange() throws Exception {
|
||||
InteractiveInfoAtom ia = new InteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
|
||||
// Change the number
|
||||
|
|
|
@ -35,13 +35,13 @@ public final class TestNotesAtom {
|
|||
0, 0, 0, 0x80-256, 0, 0, 0x0D, 0x30 };
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
NotesAtom na = new NotesAtom(data_a, 0, data_a.length);
|
||||
assertEquals(1009L, na.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFlags() {
|
||||
void testFlags() {
|
||||
NotesAtom na = new NotesAtom(data_a, 0, data_a.length);
|
||||
assertEquals(0x80000000, na.getSlideID());
|
||||
assertFalse(na.getFollowMasterObjects());
|
||||
|
@ -50,7 +50,7 @@ public final class TestNotesAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
NotesAtom na = new NotesAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
na.writeOut(baos);
|
||||
|
|
|
@ -61,12 +61,12 @@ public final class TestRecordContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testIsAnAtom() {
|
||||
void testIsAnAtom() {
|
||||
assertFalse( recordContainer.isAnAtom() );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAppendChildRecord() {
|
||||
void testAppendChildRecord() {
|
||||
// Grab records for testing with
|
||||
Record r = recordContainer.getChildRecords()[0];
|
||||
Record rb = recordContainer.getChildRecords()[1];
|
||||
|
@ -100,7 +100,7 @@ public final class TestRecordContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testAddChildAfter() {
|
||||
void testAddChildAfter() {
|
||||
// Working with new StyleTextPropAtom
|
||||
Record newRecord = new StyleTextPropAtom(0);
|
||||
|
||||
|
@ -130,7 +130,7 @@ public final class TestRecordContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testAddChildBefore() {
|
||||
void testAddChildBefore() {
|
||||
// Working with new StyleTextPropAtom
|
||||
Record newRecord = new StyleTextPropAtom(0);
|
||||
|
||||
|
@ -171,7 +171,7 @@ public final class TestRecordContainer {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRemove() {
|
||||
void testRemove() {
|
||||
Record[] ch = recordContainer.getChildRecords();
|
||||
Record removeRecord = recordContainer.removeChild(ch[0]);
|
||||
assertSame(ch[0], removeRecord);
|
||||
|
|
|
@ -28,21 +28,21 @@ import org.junit.jupiter.api.Test;
|
|||
*/
|
||||
public final class TestRecordTypes {
|
||||
@Test
|
||||
public void testPPTNameLookups() {
|
||||
void testPPTNameLookups() {
|
||||
assertEquals("MainMaster", RecordTypes.MainMaster.name());
|
||||
assertEquals("TextBytesAtom", RecordTypes.TextBytesAtom.name());
|
||||
assertEquals("VBAInfo", RecordTypes.VBAInfo.name());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEscherNameLookups() {
|
||||
void testEscherNameLookups() {
|
||||
assertEquals("DGG_CONTAINER", EscherRecordTypes.DGG_CONTAINER.name());
|
||||
assertEquals("CLIENT_TEXTBOX", EscherRecordTypes.CLIENT_TEXTBOX.name());
|
||||
assertEquals("SELECTION", EscherRecordTypes.SELECTION.name());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPPTClassLookups() {
|
||||
void testPPTClassLookups() {
|
||||
// If this record is ever implemented, change to one that isn't!
|
||||
// This is checking the "unhandled default" stuff works
|
||||
assertEquals(RecordTypes.UnknownRecordPlaceholder, RecordTypes.forTypeID(-10));
|
||||
|
|
|
@ -41,13 +41,13 @@ public final class TestSlideAtom {
|
|||
0, 1, 0, 0, 7, 0, 0x0C, 0x30 };
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
|
||||
assertEquals(1007l, sa.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFlags() {
|
||||
void testFlags() {
|
||||
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
|
||||
|
||||
// First 12 bytes are a SSlideLayoutAtom, checked elsewhere
|
||||
|
@ -63,7 +63,7 @@ public final class TestSlideAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSSlideLayoutAtom() {
|
||||
void testSSlideLayoutAtom() {
|
||||
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
|
||||
SlideAtomLayout ssla = sa.getSSlideLayoutAtom();
|
||||
|
||||
|
@ -73,7 +73,7 @@ public final class TestSlideAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws IOException {
|
||||
void testWrite() throws IOException {
|
||||
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
sa.writeOut(baos);
|
||||
|
@ -81,7 +81,7 @@ public final class TestSlideAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testSSSlideInfoAtom() throws IOException {
|
||||
void testSSSlideInfoAtom() throws IOException {
|
||||
HSLFSlideShow ss1 = new HSLFSlideShow();
|
||||
HSLFSlide slide1 = ss1.createSlide(), slide2 = ss1.createSlide();
|
||||
slide2.setHidden(true);
|
||||
|
|
|
@ -36,13 +36,13 @@ public final class TestSlidePersistAtom {
|
|||
1, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
SlidePersistAtom spa = new SlidePersistAtom(data_a, 0, data_a.length);
|
||||
assertEquals(1011L, spa.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFlags() {
|
||||
void testFlags() {
|
||||
SlidePersistAtom spa = new SlidePersistAtom(data_a, 0, data_a.length);
|
||||
assertEquals(4, spa.getRefID() );
|
||||
assertTrue(spa.getHasShapesOtherThanPlaceholders());
|
||||
|
@ -51,7 +51,7 @@ public final class TestSlidePersistAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
SlidePersistAtom spa = new SlidePersistAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
spa.writeOut(baos);
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
|
|||
*/
|
||||
public final class TestSound {
|
||||
@Test
|
||||
public void testRealFile() throws IOException {
|
||||
void testRealFile() throws IOException {
|
||||
POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(slTests.openResourceAsStream("sound.ppt"));
|
||||
|
|
|
@ -139,7 +139,7 @@ public final class TestStyleTextPropAtom {
|
|||
private static final int data_d_text_len = 0xA0-1;
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
StyleTextPropAtom stpc = new StyleTextPropAtom(data_c,0,data_c.length);
|
||||
|
@ -150,7 +150,7 @@ public final class TestStyleTextPropAtom {
|
|||
|
||||
|
||||
@Test
|
||||
public void testCharacterStyleCounts() {
|
||||
void testCharacterStyleCounts() {
|
||||
StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
|
||||
|
@ -165,7 +165,7 @@ public final class TestStyleTextPropAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testParagraphStyleCounts() {
|
||||
void testParagraphStyleCounts() {
|
||||
StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
|
||||
|
@ -181,7 +181,7 @@ public final class TestStyleTextPropAtom {
|
|||
|
||||
|
||||
@Test
|
||||
public void testCharacterStyleLengths() {
|
||||
void testCharacterStyleLengths() {
|
||||
StyleTextPropAtom stpa = new StyleTextPropAtom(data_a,0,data_a.length);
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
|
||||
|
@ -212,7 +212,7 @@ public final class TestStyleTextPropAtom {
|
|||
|
||||
|
||||
@Test
|
||||
public void testCharacterPropOrdering() {
|
||||
void testCharacterPropOrdering() {
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
stpb.setParentTextSize(data_b_text_len);
|
||||
|
||||
|
@ -260,7 +260,7 @@ public final class TestStyleTextPropAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testParagraphProps() {
|
||||
void testParagraphProps() {
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
stpb.setParentTextSize(data_b_text_len);
|
||||
|
||||
|
@ -305,7 +305,7 @@ public final class TestStyleTextPropAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCharacterProps() {
|
||||
void testCharacterProps() {
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
stpb.setParentTextSize(data_b_text_len);
|
||||
|
||||
|
@ -377,7 +377,7 @@ public final class TestStyleTextPropAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFindAddTextProp() {
|
||||
void testFindAddTextProp() {
|
||||
StyleTextPropAtom stpb = new StyleTextPropAtom(data_b,0,data_b.length);
|
||||
stpb.setParentTextSize(data_b_text_len);
|
||||
|
||||
|
@ -437,7 +437,7 @@ public final class TestStyleTextPropAtom {
|
|||
* constructor, and setting the required properties
|
||||
*/
|
||||
@Test
|
||||
public void testCreateAFromScatch() throws Exception {
|
||||
void testCreateAFromScatch() throws Exception {
|
||||
// Start with an empty one
|
||||
StyleTextPropAtom stpa = new StyleTextPropAtom(54);
|
||||
|
||||
|
@ -475,7 +475,7 @@ public final class TestStyleTextPropAtom {
|
|||
* constructor, and setting the required properties
|
||||
*/
|
||||
@Test
|
||||
public void testCreateBFromScatch() throws Exception {
|
||||
void testCreateBFromScatch() throws Exception {
|
||||
// Start with an empty one
|
||||
StyleTextPropAtom stpa = new StyleTextPropAtom(data_b_text_len);
|
||||
|
||||
|
@ -645,28 +645,28 @@ public final class TestStyleTextPropAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWriteA() throws IOException {
|
||||
void testWriteA() throws IOException {
|
||||
doReadWrite(data_a, -1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadWriteA() throws IOException {
|
||||
void testLoadWriteA() throws IOException {
|
||||
doReadWrite(data_b, data_b_text_len);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testWriteB() throws IOException {
|
||||
void testWriteB() throws IOException {
|
||||
doReadWrite(data_b, -1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadWriteB() throws IOException {
|
||||
void testLoadWriteB() throws IOException {
|
||||
doReadWrite(data_b, data_b_text_len);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadWriteC() throws IOException {
|
||||
void testLoadWriteC() throws IOException {
|
||||
// BitMaskTextProperties will sanitize the output
|
||||
byte[] expected = data_c.clone();
|
||||
expected[56] = 0;
|
||||
|
@ -675,7 +675,7 @@ public final class TestStyleTextPropAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testLoadWriteD() throws IOException {
|
||||
void testLoadWriteD() throws IOException {
|
||||
doReadWrite(data_d, data_d_text_len);
|
||||
}
|
||||
|
||||
|
@ -697,7 +697,7 @@ public final class TestStyleTextPropAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNotEnoughDataProp() {
|
||||
void testNotEnoughDataProp() {
|
||||
// We don't have enough data in the record to cover
|
||||
// all the properties the mask says we have
|
||||
// Make sure we just do the best we can
|
||||
|
@ -711,7 +711,7 @@ public final class TestStyleTextPropAtom {
|
|||
* Check the test data for Bug 40143.
|
||||
*/
|
||||
@Test
|
||||
public void testBug40143() {
|
||||
void testBug40143() {
|
||||
StyleTextPropAtom atom = new StyleTextPropAtom(data_d, 0, data_d.length);
|
||||
atom.setParentTextSize(data_d_text_len);
|
||||
|
||||
|
@ -734,7 +734,7 @@ public final class TestStyleTextPropAtom {
|
|||
* Check the test data for Bug 42677.
|
||||
*/
|
||||
@Test
|
||||
public void test42677() throws IOException {
|
||||
void test42677() throws IOException {
|
||||
int length = 18;
|
||||
byte[] data = {
|
||||
0x00, 0x00, (byte)0xA1, 0x0F, 0x28, 0x00, 0x00, 0x00,
|
||||
|
@ -760,7 +760,7 @@ public final class TestStyleTextPropAtom {
|
|||
* </StyleTextPropAtom>
|
||||
*/
|
||||
@Test
|
||||
public void test45815() throws IOException {
|
||||
void test45815() throws IOException {
|
||||
int length = 19;
|
||||
byte[] data = {
|
||||
0x00, 0x00, (byte)0xA1, 0x0F, 0x5E, 0x00, 0x00, 0x00, 0x14, 0x00,
|
||||
|
|
|
@ -41,26 +41,26 @@ public final class TestTextBytesAtom {
|
|||
private final String alt_text = "This is a test title";
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
TextBytesAtom tba = new TextBytesAtom(data,0,data.length);
|
||||
assertEquals(4008L, tba.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTextA() {
|
||||
void testTextA() {
|
||||
TextBytesAtom tba = new TextBytesAtom(data,0,data.length);
|
||||
String data_text = "This is the title on page 2";
|
||||
assertEquals(data_text, tba.getText());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTextB() {
|
||||
void testTextB() {
|
||||
TextBytesAtom tba = new TextBytesAtom(alt_data,0,alt_data.length);
|
||||
assertEquals(alt_text, tba.getText());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChangeText() throws Exception {
|
||||
void testChangeText() throws Exception {
|
||||
TextBytesAtom tba = new TextBytesAtom(data,0,data.length);
|
||||
tba.setText(alt_text.getBytes(StandardCharsets.ISO_8859_1));
|
||||
|
||||
|
@ -70,7 +70,7 @@ public final class TestTextBytesAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
TextBytesAtom tba = new TextBytesAtom(data,0,data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
tba.writeOut(baos);
|
||||
|
|
|
@ -38,25 +38,25 @@ public final class TestTextCharsAtom {
|
|||
private final String alt_text = "This\u01A3";
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
TextCharsAtom tca = new TextCharsAtom(data,0,data.length);
|
||||
assertEquals(4000L, tca.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTextA() {
|
||||
void testTextA() {
|
||||
TextCharsAtom tca = new TextCharsAtom(data,0,data.length);
|
||||
assertEquals(data_text, tca.getText());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTextB() {
|
||||
void testTextB() {
|
||||
TextCharsAtom tca = new TextCharsAtom(alt_data,0,alt_data.length);
|
||||
assertEquals(alt_text, tca.getText());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChangeText() throws Exception {
|
||||
void testChangeText() throws Exception {
|
||||
TextCharsAtom tca = new TextCharsAtom(data,0,data.length);
|
||||
tca.setText(alt_text);
|
||||
|
||||
|
@ -66,7 +66,7 @@ public final class TestTextCharsAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
TextCharsAtom tca = new TextCharsAtom(data,0,data.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
tca.writeOut(baos);
|
||||
|
@ -74,7 +74,7 @@ public final class TestTextCharsAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCreateNew() throws Exception {
|
||||
void testCreateNew() throws Exception {
|
||||
TextCharsAtom tca = new TextCharsAtom();
|
||||
assertEquals(0, tca.getText().length());
|
||||
|
||||
|
|
|
@ -36,13 +36,13 @@ public final class TestTextHeaderAtom {
|
|||
private final byte[] body_data = { 0, 0, 0x9f-256, 0x0f, 4, 0, 0, 0, 1, 0, 0, 0 };
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
TextHeaderAtom tha = new TextHeaderAtom(notes_data,0,12);
|
||||
assertEquals(3999L, tha.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypes() {
|
||||
void testTypes() {
|
||||
TextHeaderAtom n_tha = new TextHeaderAtom(notes_data,0,12);
|
||||
TextHeaderAtom t_tha = new TextHeaderAtom(title_data,0,12);
|
||||
TextHeaderAtom b_tha = new TextHeaderAtom(body_data,0,12);
|
||||
|
@ -52,7 +52,7 @@ public final class TestTextHeaderAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
TextHeaderAtom tha = new TextHeaderAtom(notes_data,0,12);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
tha.writeOut(baos);
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class TestTextRulerAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testReadRuler() {
|
||||
void testReadRuler() {
|
||||
TextRulerAtom ruler = new TextRulerAtom(data_1, 0, data_1.length);
|
||||
assertEquals(ruler.getNumberOfLevels(), 0);
|
||||
assertEquals(ruler.getDefaultTabSize(), 0);
|
||||
|
@ -59,7 +59,7 @@ public final class TestTextRulerAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWriteRuler() throws Exception {
|
||||
void testWriteRuler() throws Exception {
|
||||
TextRulerAtom ruler = new TextRulerAtom(data_1, 0, data_1.length);
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ruler.writeOut(out);
|
||||
|
@ -69,7 +69,7 @@ public final class TestTextRulerAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRead2() throws Exception {
|
||||
void testRead2() throws Exception {
|
||||
TextRulerAtom ruler = TextRulerAtom.getParagraphInstance();
|
||||
ruler.setParagraphIndent((short)249, (short)321);
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class TestTextSpecInfoAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
TextSpecInfoAtom spec = new TextSpecInfoAtom(data_1, 0, data_1.length);
|
||||
TextSpecInfoRun[] run = spec.getTextSpecInfoRuns();
|
||||
assertEquals(5, run.length);
|
||||
|
@ -54,7 +54,7 @@ public final class TestTextSpecInfoAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
TextSpecInfoAtom spec = new TextSpecInfoAtom(data_1, 0, data_1.length);
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
spec.writeOut(out);
|
||||
|
@ -62,7 +62,7 @@ public final class TestTextSpecInfoAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testReset() throws Exception {
|
||||
void testReset() throws Exception {
|
||||
TextSpecInfoAtom spec = new TextSpecInfoAtom(data_1, 0, data_1.length);
|
||||
spec.reset(32); //length of the parent text
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class TestTxInteractiveInfoAtom {
|
|||
};
|
||||
|
||||
@Test
|
||||
public void testRead() {
|
||||
void testRead() {
|
||||
TxInteractiveInfoAtom ia1 = new TxInteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
|
||||
assertEquals(4063, ia1.getRecordType());
|
||||
|
@ -56,7 +56,7 @@ public final class TestTxInteractiveInfoAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
TxInteractiveInfoAtom atom = new TxInteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
atom.writeOut(baos);
|
||||
|
@ -65,7 +65,7 @@ public final class TestTxInteractiveInfoAtom {
|
|||
|
||||
// Create A from scratch
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
void testCreate() throws Exception {
|
||||
TxInteractiveInfoAtom ia = new TxInteractiveInfoAtom();
|
||||
|
||||
// Set values
|
||||
|
@ -80,7 +80,7 @@ public final class TestTxInteractiveInfoAtom {
|
|||
|
||||
// Try to turn a into b
|
||||
@Test
|
||||
public void testChange() throws Exception {
|
||||
void testChange() throws Exception {
|
||||
TxInteractiveInfoAtom ia = new TxInteractiveInfoAtom(data_a, 0, data_a.length);
|
||||
|
||||
// Change the number
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class TestTxMasterStyleAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultStyles() {
|
||||
void testDefaultStyles() {
|
||||
TxMasterStyleAtom[] txmaster = getMasterStyles();
|
||||
for (final TxMasterStyleAtom atom : txmaster) {
|
||||
final int txtype = atom.getTextType();
|
||||
|
|
|
@ -36,13 +36,13 @@ public final class TestUserEditAtom {
|
|||
5, 0, 0, 0, 1, 0, 0xF6-256, 77 };
|
||||
|
||||
@Test
|
||||
public void testRecordType() {
|
||||
void testRecordType() {
|
||||
UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length);
|
||||
assertEquals(4085L, uea.getRecordType());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFlags() {
|
||||
void testFlags() {
|
||||
UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length);
|
||||
|
||||
assertEquals(256, uea.getLastViewedSlideID() );
|
||||
|
@ -55,7 +55,7 @@ public final class TestUserEditAtom {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testWrite() throws Exception {
|
||||
void testWrite() throws Exception {
|
||||
UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
uea.writeOut(baos);
|
||||
|
|
|
@ -70,7 +70,7 @@ public final class TestAddingSlides {
|
|||
* Test adding a slide to an empty slideshow
|
||||
*/
|
||||
@Test
|
||||
public void testAddSlideToEmpty() throws IOException {
|
||||
void testAddSlideToEmpty() throws IOException {
|
||||
// Doesn't have any slides
|
||||
assertEquals(0, ss_empty.getSlides().size());
|
||||
|
||||
|
@ -119,7 +119,7 @@ public final class TestAddingSlides {
|
|||
* Test adding a slide to an existing slideshow
|
||||
*/
|
||||
@Test
|
||||
public void testAddSlideToExisting() throws IOException {
|
||||
void testAddSlideToExisting() throws IOException {
|
||||
// Has one slide
|
||||
assertEquals(1, ss_one.getSlides().size());
|
||||
HSLFSlide s1 = ss_one.getSlides().get(0);
|
||||
|
@ -165,7 +165,7 @@ public final class TestAddingSlides {
|
|||
* Test adding a slide to an existing slideshow, with two slides already
|
||||
*/
|
||||
@Test
|
||||
public void testAddSlideToExisting2() throws IOException {
|
||||
void testAddSlideToExisting2() throws IOException {
|
||||
// grab UserEditAtom
|
||||
UserEditAtom usredit = null;
|
||||
Record[] _records = ss_two.getSlideShowImpl().getRecords();
|
||||
|
@ -224,7 +224,7 @@ public final class TestAddingSlides {
|
|||
* Test SlideShow#removeSlide
|
||||
*/
|
||||
@Test
|
||||
public void testRemoving() throws IOException {
|
||||
void testRemoving() throws IOException {
|
||||
HSLFSlide slide1 = ss_empty.createSlide();
|
||||
HSLFSlide slide2 = ss_empty.createSlide();
|
||||
|
||||
|
@ -249,7 +249,7 @@ public final class TestAddingSlides {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void test47261() throws IOException {
|
||||
void test47261() throws IOException {
|
||||
HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("47261.ppt");
|
||||
List<HSLFSlide> slides = ppt.getSlides();
|
||||
Document doc = ppt.getDocumentRecord();
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
|
|||
*/
|
||||
public final class TestCounts {
|
||||
@Test
|
||||
public void testSheetsCount() throws IOException {
|
||||
void testSheetsCount() throws IOException {
|
||||
HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt");
|
||||
|
||||
List<HSLFSlide> slides = ppt.getSlides();
|
||||
|
@ -54,7 +54,7 @@ public final class TestCounts {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNotesCount() throws IOException {
|
||||
void testNotesCount() throws IOException {
|
||||
HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("basic_test_ppt_file.ppt");
|
||||
|
||||
List<HSLFNotes> notes = ppt.getNotes();
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
public final class TestHSLFSlideShowFactory extends BaseTestSlideShowFactory {
|
||||
@Test
|
||||
public void testFactory() throws Exception {
|
||||
void testFactory() throws Exception {
|
||||
testFactory("pictures.ppt", "Password_Protected-hello.ppt", "hello");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class TestMostRecentRecords {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCount() {
|
||||
void testCount() {
|
||||
// Most recent core records
|
||||
org.apache.poi.hslf.record.Record[] mrcr = ss.getMostRecentCoreRecords();
|
||||
|
||||
|
@ -50,7 +50,7 @@ public final class TestMostRecentRecords {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testRightRecordTypes() {
|
||||
void testRightRecordTypes() {
|
||||
// Most recent core records
|
||||
org.apache.poi.hslf.record.Record[] mrcr = ss.getMostRecentCoreRecords();
|
||||
|
||||
|
@ -72,7 +72,7 @@ public final class TestMostRecentRecords {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCorrectRecords() {
|
||||
void testCorrectRecords() {
|
||||
// Most recent core records
|
||||
org.apache.poi.hslf.record.Record[] mrcr = ss.getMostRecentCoreRecords();
|
||||
|
||||
|
|
|
@ -39,14 +39,14 @@ public final class TestNotesText {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNotesOne() {
|
||||
void testNotesOne() {
|
||||
HSLFNotes notes = ss.getNotes().get(0);
|
||||
String[] expectText = {"These are the notes for page 1"};
|
||||
assertArrayEquals(expectText, toStrings(notes));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotesTwo() {
|
||||
void testNotesTwo() {
|
||||
HSLFNotes notes = ss.getNotes().get(1);
|
||||
String[] expectText = {"These are the notes on page two, again lacking formatting"};
|
||||
assertArrayEquals(expectText, toStrings(notes));
|
||||
|
|
|
@ -46,7 +46,7 @@ public final class TestNumberedList {
|
|||
private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testNumberedList() throws Exception {
|
||||
void testNumberedList() throws Exception {
|
||||
HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("numbers.ppt"));
|
||||
final List<HSLFSlide> slides = ppt.getSlides();
|
||||
assertEquals(2, slides.size());
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class TestNumberedList2 {
|
|||
private static final POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testNumberedList() throws IOException {
|
||||
void testNumberedList() throws IOException {
|
||||
try (HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("numbers2.ppt"))) {
|
||||
final List<HSLFSlide> slides = ppt.getSlides();
|
||||
assertEquals(2, slides.size());
|
||||
|
|
|
@ -50,7 +50,7 @@ public final class TestNumberedList3 {
|
|||
private static final POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
|
||||
|
||||
@Test
|
||||
public void testNumberedList() throws IOException {
|
||||
void testNumberedList() throws IOException {
|
||||
try (HSLFSlideShow ppt = new HSLFSlideShow(_slTests.openResourceAsStream("numbers3.ppt"))) {
|
||||
final List<HSLFSlide> slides = ppt.getSlides();
|
||||
assertEquals(1, slides.size());
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue