PDDocument doc = null;
try
{
doc = new PDDocument();
PDAcroForm form = new PDAcroForm( doc );
PDTextbox textBox = new PDTextbox(form);
//assert that default is false.
assertFalse( textBox.shouldComb() );
//try setting and clearing a single field
textBox.setComb( true );
assertTrue( textBox.shouldComb() );
textBox.setComb( false );
assertFalse( textBox.shouldComb() );
//try setting and clearing multiple fields
textBox.setComb( true );
textBox.setDoNotScroll( true );
assertTrue( textBox.shouldComb() );
assertTrue( textBox.doNotScroll() );
textBox.setComb( false );
textBox.setDoNotScroll( false );
assertFalse( textBox.shouldComb() );
assertFalse( textBox.doNotScroll() );
//assert that setting a field to false multiple times works
textBox.setComb( false );
assertFalse( textBox.shouldComb() );
textBox.setComb( false );
assertFalse( textBox.shouldComb() );
//assert that setting a field to true multiple times works
textBox.setComb( true );
assertTrue( textBox.shouldComb() );
textBox.setComb( true );
assertTrue( textBox.shouldComb() );