diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2015-09-08 00:04:12 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2015-09-08 00:04:12 +0000 |
commit | 0a396d589c8ce4a59e65b572f0c5238979b30a26 (patch) | |
tree | 3a5391ece92b2eb8dccf69e3309c6d33ca4c8a61 /src/scratchpad/testcases/org/apache/poi/hdgf/chunks | |
parent | e84b4d041c63936ab584bc3ca075e24035591f88 (diff) | |
download | poi-0a396d589c8ce4a59e65b572f0c5238979b30a26.tar.gz poi-0a396d589c8ce4a59e65b572f0c5238979b30a26.zip |
Bug 58326 - Forbidden APIs patches - second set of changes for charset settings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701713 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases/org/apache/poi/hdgf/chunks')
-rw-r--r-- | src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java b/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java index f4107c8e3a..2cbbbecbdf 100644 --- a/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java +++ b/src/scratchpad/testcases/org/apache/poi/hdgf/chunks/TestChunks.java @@ -17,9 +17,14 @@ package org.apache.poi.hdgf.chunks; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; -public final class TestChunks extends TestCase { +import org.junit.Test; + +public final class TestChunks { public static final byte[] data_a = new byte[] { 70, 0, 0, 0, -1, -1, -1, -1, 2, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -82,9 +87,9 @@ public static final byte[] data_b = new byte[] { 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - + + @Test public void testChunkHeaderA() throws Exception { - ChunkFactory cf = new ChunkFactory(11); ChunkHeader h = ChunkHeader.createChunkHeader(11, data_a, 0); @@ -101,8 +106,9 @@ public static final byte[] data_b = new byte[] { 70, 0, 0, 0, assertTrue(header.hasTrailer()); assertTrue(header.hasSeparator()); } - public void testChunkHeaderB() throws Exception { - ChunkFactory cf = new ChunkFactory(11); + + @Test + public void testChunkHeaderB() throws Exception { ChunkHeader h = ChunkHeader.createChunkHeader(11, data_b, 0); @@ -120,7 +126,8 @@ public static final byte[] data_b = new byte[] { 70, 0, 0, 0, assertTrue(header.hasSeparator()); } - public void testOneChunk() throws Exception { + @Test + public void testOneChunk() throws Exception { ChunkFactory cf = new ChunkFactory(11); cf.createChunk(data_a, 0); cf.createChunk(data_b, 0); @@ -152,7 +159,8 @@ public static final byte[] data_b = new byte[] { 70, 0, 0, 0, assertEquals("0", chunk.commandDefinitions[1].getName()); } - public void testAnotherChunk() throws Exception { + @Test + public void testAnotherChunk() throws Exception { ChunkFactory cf = new ChunkFactory(11); // Go for the 2nd chunk in the stream @@ -187,7 +195,8 @@ public static final byte[] data_b = new byte[] { 70, 0, 0, 0, assertEquals("0", chunk.commandDefinitions[1].getName()); } - public void testManyChunks() throws Exception { + @Test + public void testManyChunks() throws Exception { ChunkFactory cf = new ChunkFactory(11); Chunk chunk; int offset = 0; |