pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1641253 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java
Date Sun, 23 Nov 2014 19:39:57 GMT
Author: msahyoun
Date: Sun Nov 23 19:39:56 2014
New Revision: 1641253

URL: http://svn.apache.org/r1641253
Log:
PDFBOX-2516 enhance unit test to assert for default value DV

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java?rev=1641253&r1=1641252&r2=1641253&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java
(original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestFields.java
Sun Nov 23 19:39:56 2014
@@ -24,6 +24,7 @@ import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.cos.COSString;
 import org.apache.pdfbox.pdmodel.PDDocument;
 
 /**
@@ -155,6 +156,12 @@ public class TestFields extends TestCase
             assertEquals(field.getDefaultValue(),COSName.getPDFName("Yes"));
             assertEquals(field.getDefaultValue(),field.getDictionary().getDictionaryObject(COSName.DV));
             
+            // get the TextField with a DV entry
+            field = form.getField("TextField-DefaultValue");
+            assertNotNull(field);
+            assertEquals(((COSString) field.getDefaultValue()).getString(),"DefaultValue");
+            assertEquals(field.getDefaultValue(),field.getDictionary().getDictionaryObject(COSName.DV));
+            
         }
         finally
         {



Mime
View raw message