File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
main/java/com/itextpdf/html2pdf
test/java/com/itextpdf/html2pdf Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ public ConverterProperties(ConverterProperties other) {
145145 this .charset = other .charset ;
146146 this .metaInfo = other .metaInfo ;
147147 this .limitOfLayouts = other .limitOfLayouts ;
148+ this .immediateFlush = other .immediateFlush ;
148149 }
149150
150151 /**
Original file line number Diff line number Diff line change @@ -74,6 +74,24 @@ public void setEventMetaInfoAndGetTest() {
7474 Assert .assertSame (testMetaInfo , metaInfo );
7575 }
7676
77+ @ Test
78+ public void checkDefaultsTest () {
79+ ConverterProperties properties = new ConverterProperties ();
80+
81+ Assert .assertTrue (properties .isImmediateFlush ());
82+ Assert .assertFalse (properties .isCreateAcroForm ());
83+ Assert .assertEquals (10 , properties .getLimitOfLayouts ());
84+
85+ properties .setImmediateFlush (false );
86+ properties .setCreateAcroForm (true );
87+ properties .setLimitOfLayouts (20 );
88+ ConverterProperties propertiesCopied = new ConverterProperties (properties );
89+
90+ Assert .assertFalse (propertiesCopied .isImmediateFlush ());
91+ Assert .assertTrue (propertiesCopied .isCreateAcroForm ());
92+ Assert .assertEquals (20 , propertiesCopied .getLimitOfLayouts ());
93+ }
94+
7795 private static class TestMetaInfo implements IMetaInfo {
7896 }
7997}
You can’t perform that action at this time.
0 commit comments