diff options
author | Rainer Klute <klute@apache.org> | 2004-06-22 16:16:33 +0000 |
---|---|---|
committer | Rainer Klute <klute@apache.org> | 2004-06-22 16:16:33 +0000 |
commit | 9957bcd83570010df51ac0ccac3c839507a86850 (patch) | |
tree | 384da7ad3122b2f1ced05d353878180007555278 /src/testcases | |
parent | 165ff4ff635a88ad547cbb1c3d4cddd496e86d8b (diff) | |
download | poi-9957bcd83570010df51ac0ccac3c839507a86850.tar.gz poi-9957bcd83570010df51ac0ccac3c839507a86850.zip |
*** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353563 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
3 files changed, 16 insertions, 6 deletions
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestBasic.java b/src/testcases/org/apache/poi/hpsf/basic/TestBasic.java index b0eeac2926..e3b66725ad 100644 --- a/src/testcases/org/apache/poi/hpsf/basic/TestBasic.java +++ b/src/testcases/org/apache/poi/hpsf/basic/TestBasic.java @@ -1,4 +1,3 @@ - /* ==================================================================== Copyright 2002-2004 Apache Software Foundation @@ -24,6 +23,7 @@ import java.io.FileFilter; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.util.List; import junit.framework.Assert; @@ -133,9 +133,13 @@ public class TestBasic extends TestCase * NoPropertySetStreamException} will be thrown when trying to * create a {@link PropertySet}.</p> * - * @exception IOException if an I/O exception occurs + * @exception IOException if an I/O exception occurs. + * + * @exception UnsupportedEncodingException if a character encoding is not + * supported. */ - public void testCreatePropertySets() throws IOException + public void testCreatePropertySets() + throws UnsupportedEncodingException, IOException { Class[] expected = new Class[] { diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java b/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java index 92eb418f8f..59fe77418c 100644 --- a/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java +++ b/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import junit.framework.Assert; import junit.framework.TestCase; @@ -116,9 +117,13 @@ public class TestEmptyProperties extends TestCase * NoPropertySetStreamException} will be thrown when trying to * create a {@link PropertySet}.</p> * - * @exception IOException if an I/O exception occurs + * @exception IOException if an I/O exception occurs. + * + * @exception UnsupportedEncodingException if a character encoding is not + * supported. */ - public void testCreatePropertySets() throws IOException + public void testCreatePropertySets() + throws UnsupportedEncodingException, IOException { Class[] expected = new Class[] { diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java b/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java index 699b211556..9c7a2b47ac 100644 --- a/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java +++ b/src/testcases/org/apache/poi/hpsf/basic/TestUnicode.java @@ -26,6 +26,7 @@ import java.io.IOException; import junit.framework.Assert; import junit.framework.TestCase; +import org.apache.poi.hpsf.Constants; import org.apache.poi.hpsf.HPSFException; import org.apache.poi.hpsf.PropertySet; import org.apache.poi.hpsf.PropertySetFactory; @@ -99,7 +100,7 @@ public class TestUnicode extends TestCase Assert.assertEquals(ps.getSectionCount(), 2); Section s = (Section) ps.getSections().get(1); Assert.assertEquals(s.getProperty(1), - new Integer(1200)); + new Integer(Constants.CP_UTF16)); Assert.assertEquals(s.getProperty(2), new Long(4198897018L)); Assert.assertEquals(s.getProperty(3), |