File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
itext.tests/itext.html2pdf.tests/itext/html2pdf
itext/itext.html2pdf/itext/html2pdf Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,21 @@ public virtual void SetEventMetaInfoAndGetTest() {
6363 NUnit . Framework . Assert . AreSame ( testMetaInfo , metaInfo ) ;
6464 }
6565
66+ [ NUnit . Framework . Test ]
67+ public virtual void CheckDefaultsTest ( ) {
68+ ConverterProperties properties = new ConverterProperties ( ) ;
69+ NUnit . Framework . Assert . IsTrue ( properties . IsImmediateFlush ( ) ) ;
70+ NUnit . Framework . Assert . IsFalse ( properties . IsCreateAcroForm ( ) ) ;
71+ NUnit . Framework . Assert . AreEqual ( 10 , properties . GetLimitOfLayouts ( ) ) ;
72+ properties . SetImmediateFlush ( false ) ;
73+ properties . SetCreateAcroForm ( true ) ;
74+ properties . SetLimitOfLayouts ( 20 ) ;
75+ ConverterProperties propertiesCopied = new ConverterProperties ( properties ) ;
76+ NUnit . Framework . Assert . IsFalse ( propertiesCopied . IsImmediateFlush ( ) ) ;
77+ NUnit . Framework . Assert . IsTrue ( propertiesCopied . IsCreateAcroForm ( ) ) ;
78+ NUnit . Framework . Assert . AreEqual ( 20 , propertiesCopied . GetLimitOfLayouts ( ) ) ;
79+ }
80+
6681 private class TestMetaInfo : IMetaInfo {
6782 }
6883 }
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ public ConverterProperties(iText.Html2pdf.ConverterProperties other) {
127127 this . charset = other . charset ;
128128 this . metaInfo = other . metaInfo ;
129129 this . limitOfLayouts = other . limitOfLayouts ;
130+ this . immediateFlush = other . immediateFlush ;
130131 }
131132
132133 /// <summary>Gets the media device description.</summary>
Original file line number Diff line number Diff line change 1- 1cc41674ed2a869bccb7c1de44071f34de81bb34
1+ 2983a77a0c2a4e28db08c84f6ceb1dfa3359b024
You can’t perform that action at this time.
0 commit comments