Skip to content

Commit 6727ebf

Browse files
committed
Update autoported files
022fa281e293615213a453da5ca829f4b984dcd3
1 parent 28cacd8 commit 6727ebf

File tree

47 files changed

+193
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+193
-193
lines changed

itext.tests/itext.barcodes.tests/itext/barcodes/BarcodeDataMatrixTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public virtual void Barcode12Test() {
233233
byte[] str = "AbcdFFghijklmnop".GetBytes();
234234
barcodeDataMatrix.SetCode(str, -1, str.Length);
235235
}
236-
, NUnit.Framework.Throws.TypeOf<IndexOutOfRangeException>());
236+
, NUnit.Framework.Throws.InstanceOf<IndexOutOfRangeException>())
237237
;
238238
}
239239

@@ -246,7 +246,7 @@ public virtual void Barcode13Test() {
246246
byte[] str = "AbcdFFghijklmnop".GetBytes();
247247
barcodeDataMatrix.SetCode(str, 0, str.Length + 1);
248248
}
249-
, NUnit.Framework.Throws.TypeOf<IndexOutOfRangeException>());
249+
, NUnit.Framework.Throws.InstanceOf<IndexOutOfRangeException>())
250250
;
251251
}
252252

@@ -259,7 +259,7 @@ public virtual void Barcode14Test() {
259259
byte[] str = "AbcdFFghijklmnop".GetBytes();
260260
barcodeDataMatrix.SetCode(str, 0, -1);
261261
}
262-
, NUnit.Framework.Throws.TypeOf<IndexOutOfRangeException>());
262+
, NUnit.Framework.Throws.InstanceOf<IndexOutOfRangeException>())
263263
;
264264
}
265265

itext.tests/itext.io.tests/itext/io/font/FontProgramTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public virtual void ExceptionMessageTest() {
5454
NUnit.Framework.Assert.That(() => {
5555
FontProgramFactory.CreateFont(notExistingFont);
5656
}
57-
, NUnit.Framework.Throws.TypeOf<System.IO.IOException>().With.Message.EqualTo(MessageFormatUtil.Format(iText.IO.IOException._1NotFoundAsFileOrResource, notExistingFont)));
57+
, NUnit.Framework.Throws.InstanceOf<System.IO.IOException>().With.Message.EqualTo(MessageFormatUtil.Format(iText.IO.IOException._1NotFoundAsFileOrResource, notExistingFont)))
5858
;
5959
}
6060

itext.tests/itext.kernel.tests/itext/kernel/crypto/PdfEncryptionTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public virtual void OpenEncryptedDocWithoutPassword() {
283283
PdfDocument doc = new PdfDocument(new PdfReader(sourceFolder + "encryptedWithPasswordStandard40.pdf"));
284284
doc.Close();
285285
}
286-
, NUnit.Framework.Throws.TypeOf<BadPasswordException>().With.Message.EqualTo(BadPasswordException.BadUserPassword));
286+
, NUnit.Framework.Throws.InstanceOf<BadPasswordException>().With.Message.EqualTo(BadPasswordException.BadUserPassword))
287287
;
288288
}
289289

@@ -296,7 +296,7 @@ public virtual void OpenEncryptedDocWithWrongPassword() {
296296
PdfDocument doc = new PdfDocument(reader);
297297
doc.Close();
298298
}
299-
, NUnit.Framework.Throws.TypeOf<BadPasswordException>().With.Message.EqualTo(BadPasswordException.BadUserPassword));
299+
, NUnit.Framework.Throws.InstanceOf<BadPasswordException>().With.Message.EqualTo(BadPasswordException.BadUserPassword))
300300
;
301301
}
302302

@@ -307,7 +307,7 @@ public virtual void OpenEncryptedDocWithoutCertificate() {
307307
PdfDocument doc = new PdfDocument(new PdfReader(sourceFolder + "encryptedWithCertificateAes128.pdf"));
308308
doc.Close();
309309
}
310-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(PdfException.CertificateIsNotProvidedDocumentIsEncryptedWithPublicKeyCertificate));
310+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(PdfException.CertificateIsNotProvidedDocumentIsEncryptedWithPublicKeyCertificate))
311311
;
312312
}
313313

@@ -321,7 +321,7 @@ public virtual void OpenEncryptedDocWithoutPrivateKey() {
321321
PdfDocument doc = new PdfDocument(reader);
322322
doc.Close();
323323
}
324-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(PdfException.BadCertificateAndKey));
324+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(PdfException.BadCertificateAndKey))
325325
;
326326
}
327327

@@ -335,7 +335,7 @@ public virtual void OpenEncryptedDocWithWrongCertificate() {
335335
PdfDocument doc = new PdfDocument(reader);
336336
doc.Close();
337337
}
338-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(PdfException.BadCertificateAndKey));
338+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(PdfException.BadCertificateAndKey))
339339
;
340340
}
341341

@@ -351,7 +351,7 @@ public virtual void OpenEncryptedDocWithWrongPrivateKey() {
351351
PdfDocument doc = new PdfDocument(reader);
352352
doc.Close();
353353
}
354-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(PdfException.PdfDecryption));
354+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(PdfException.PdfDecryption))
355355
;
356356
}
357357

@@ -367,7 +367,7 @@ public virtual void OpenEncryptedDocWithWrongCertificateAndPrivateKey() {
367367
PdfDocument doc = new PdfDocument(reader);
368368
doc.Close();
369369
}
370-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(PdfException.BadCertificateAndKey));
370+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(PdfException.BadCertificateAndKey))
371371
;
372372
}
373373

@@ -429,7 +429,7 @@ public virtual void StampDocNoUserPassword() {
429429
+ fileName));
430430
document.Close();
431431
}
432-
, NUnit.Framework.Throws.TypeOf<BadPasswordException>().With.Message.EqualTo(BadPasswordException.PdfReaderNotOpenedWithOwnerPassword));
432+
, NUnit.Framework.Throws.InstanceOf<BadPasswordException>().With.Message.EqualTo(BadPasswordException.PdfReaderNotOpenedWithOwnerPassword))
433433
;
434434
}
435435

itext.tests/itext.layout.tests/itext/layout/LayoutTaggingPdf2Test.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public virtual void DocWithInvalidMapping01() {
276276
document.Add(customRolePara);
277277
document.Close();
278278
}
279-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "p", "http://iso.org/pdf/ssn")));
279+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "p", "http://iso.org/pdf/ssn")))
280280
;
281281
}
282282

@@ -301,7 +301,7 @@ public virtual void DocWithInvalidMapping02() {
301301
document.Add(customRolePara);
302302
document.Close();
303303
}
304-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleIsNotMappedToAnyStandardRole, "p")));
304+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleIsNotMappedToAnyStandardRole, "p")))
305305
;
306306
}
307307

@@ -322,7 +322,7 @@ public virtual void DocWithInvalidMapping03() {
322322
document.Add(customRolePara);
323323
document.Close();
324324
}
325-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "p", "http://iso.org/pdf2/ssn")));
325+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "p", "http://iso.org/pdf2/ssn")))
326326
;
327327
}
328328

@@ -374,7 +374,7 @@ public virtual void DocWithInvalidMapping05() {
374374
document.Add(customRolePara2);
375375
document.Close();
376376
}
377-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "p", "http://iso.org/pdf2/ssn")));
377+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "p", "http://iso.org/pdf2/ssn")))
378378
;
379379
}
380380

@@ -436,7 +436,7 @@ public virtual void DocWithInvalidMapping07() {
436436
document.Add(new Paragraph(customRolePText1));
437437
document.Close();
438438
}
439-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "span", "http://iso.org/pdf2/ssn")));
439+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleInNamespaceIsNotMappedToAnyStandardRole, "span", "http://iso.org/pdf2/ssn")))
440440
;
441441
}
442442

@@ -457,7 +457,7 @@ public virtual void DocWithInvalidMapping08() {
457457
document.Add(h9Para);
458458
document.Close();
459459
}
460-
, NUnit.Framework.Throws.TypeOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleIsNotMappedToAnyStandardRole, "H9")));
460+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(String.Format(PdfException.RoleIsNotMappedToAnyStandardRole, "H9")))
461461
;
462462
}
463463

itext.tests/itext.layout.tests/itext/layout/font/RangeTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public virtual void TestWrongRange() {
4949
NUnit.Framework.Assert.That(() => {
5050
new RangeBuilder().AddRange(11, 10);
5151
}
52-
, NUnit.Framework.Throws.TypeOf<ArgumentException>());
52+
, NUnit.Framework.Throws.InstanceOf<ArgumentException>())
5353
;
5454
}
5555

@@ -58,7 +58,7 @@ public virtual void TestWrongRangeSize() {
5858
NUnit.Framework.Assert.That(() => {
5959
new RangeBuilder().Create();
6060
}
61-
, NUnit.Framework.Throws.TypeOf<ArgumentException>());
61+
, NUnit.Framework.Throws.InstanceOf<ArgumentException>())
6262
;
6363
}
6464

itext.tests/itext.pdfa.tests/itext/pdfa/PdfA1AcroFormCheckTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public virtual void AcroFormCheck01() {
7676
doc.GetCatalog().Put(PdfName.AcroForm, acroForm);
7777
doc.Close();
7878
}
79-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(PdfAConformanceException.NEEDAPPEARANCES_FLAG_OF_THE_INTERACTIVE_FORM_DICTIONARY_SHALL_EITHER_NOT_BE_PRESENTED_OR_SHALL_BE_FALSE));
79+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(PdfAConformanceException.NEEDAPPEARANCES_FLAG_OF_THE_INTERACTIVE_FORM_DICTIONARY_SHALL_EITHER_NOT_BE_PRESENTED_OR_SHALL_BE_FALSE))
8080
;
8181
}
8282

itext.tests/itext.pdfa.tests/itext/pdfa/PdfA1ActionCheckTest.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public virtual void ActionCheck01() {
6767
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
6868
doc.Close();
6969
}
70-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Launch.GetValue())));
70+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Launch.GetValue())))
7171
;
7272
}
7373

@@ -85,7 +85,7 @@ public virtual void ActionCheck02() {
8585
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
8686
doc.Close();
8787
}
88-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Hide.GetValue())));
88+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Hide.GetValue())))
8989
;
9090
}
9191

@@ -103,7 +103,7 @@ public virtual void ActionCheck03() {
103103
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
104104
doc.Close();
105105
}
106-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Sound.GetValue())));
106+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Sound.GetValue())))
107107
;
108108
}
109109

@@ -121,7 +121,7 @@ public virtual void ActionCheck04() {
121121
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
122122
doc.Close();
123123
}
124-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Movie.GetValue())));
124+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.Movie.GetValue())))
125125
;
126126
}
127127

@@ -139,7 +139,7 @@ public virtual void ActionCheck05() {
139139
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
140140
doc.Close();
141141
}
142-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.ResetForm.GetValue())));
142+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.ResetForm.GetValue())))
143143
;
144144
}
145145

@@ -157,7 +157,7 @@ public virtual void ActionCheck06() {
157157
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
158158
doc.Close();
159159
}
160-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.ImportData.GetValue())));
160+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.ImportData.GetValue())))
161161
;
162162
}
163163

@@ -175,7 +175,7 @@ public virtual void ActionCheck07() {
175175
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
176176
doc.Close();
177177
}
178-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.JavaScript.GetValue())));
178+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.JavaScript.GetValue())))
179179
;
180180
}
181181

@@ -194,7 +194,7 @@ public virtual void ActionCheck08() {
194194
doc.GetCatalog().Put(PdfName.OpenAction, openActions);
195195
doc.Close();
196196
}
197-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException.NAMED_ACTION_TYPE_0_IS_NOT_ALLOWED, "CustomName")));
197+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException.NAMED_ACTION_TYPE_0_IS_NOT_ALLOWED, "CustomName")))
198198
;
199199
}
200200

@@ -210,7 +210,7 @@ public virtual void ActionCheck09() {
210210
page.SetAdditionalAction(PdfName.C, PdfAction.CreateJavaScript("js"));
211211
doc.Close();
212212
}
213-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.JavaScript.GetValue())));
213+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(MessageFormatUtil.Format(PdfAConformanceException._0_ACTIONS_ARE_NOT_ALLOWED, PdfName.JavaScript.GetValue())))
214214
;
215215
}
216216

@@ -228,7 +228,7 @@ public virtual void ActionCheck10() {
228228
page.SetAdditionalAction(PdfName.C, new PdfAction(action));
229229
doc.Close();
230230
}
231-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(PdfAConformanceException.DEPRECATED_SETSTATE_AND_NOOP_ACTIONS_ARE_NOT_ALLOWED));
231+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(PdfAConformanceException.DEPRECATED_SETSTATE_AND_NOOP_ACTIONS_ARE_NOT_ALLOWED))
232232
;
233233
}
234234

@@ -243,7 +243,7 @@ public virtual void ActionCheck11() {
243243
doc.GetCatalog().SetAdditionalAction(PdfName.C, PdfAction.CreateJavaScript("js"));
244244
doc.Close();
245245
}
246-
, NUnit.Framework.Throws.TypeOf<PdfAConformanceException>().With.Message.EqualTo(PdfAConformanceException.A_CATALOG_DICTIONARY_SHALL_NOT_CONTAIN_AA_ENTRY));
246+
, NUnit.Framework.Throws.InstanceOf<PdfAConformanceException>().With.Message.EqualTo(PdfAConformanceException.A_CATALOG_DICTIONARY_SHALL_NOT_CONTAIN_AA_ENTRY))
247247
;
248248
}
249249
}

0 commit comments

Comments
 (0)