forked from pipeline-foundation/itext7-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into devsecops
- Loading branch information
Showing
12 changed files
with
425 additions
and
79 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
itext.tests/itext.kernel.tests/itext/kernel/pdf/PdfUAConformanceTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2025 Apryse Group NV | ||
Authors: Apryse Software. | ||
This program is offered under a commercial and under the AGPL license. | ||
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. | ||
AGPL licensing: | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
using iText.Kernel.XMP; | ||
using iText.Kernel.XMP.Impl; | ||
using iText.Test; | ||
|
||
namespace iText.Kernel.Pdf { | ||
[NUnit.Framework.Category("UnitTest")] | ||
public class PdfUAConformanceTest : ExtendedITextTest { | ||
[NUnit.Framework.Test] | ||
public virtual void GetUA1ConformanceTest() { | ||
XMPMeta meta = new XMPMetaImpl(); | ||
meta.SetProperty(XMPConst.NS_PDFUA_ID, XMPConst.PART, "1"); | ||
PdfConformance level = PdfConformance.GetConformance(meta); | ||
NUnit.Framework.Assert.AreEqual(PdfUAConformance.PDF_UA_1, level.GetUAConformance()); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void GetUA2ConformanceTest() { | ||
XMPMeta meta = new XMPMetaImpl(); | ||
meta.SetProperty(XMPConst.NS_PDFUA_ID, XMPConst.PART, "2"); | ||
PdfConformance level = PdfConformance.GetConformance(meta); | ||
NUnit.Framework.Assert.AreEqual(PdfUAConformance.PDF_UA_2, level.GetUAConformance()); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void GetUAConformanceNullTest() { | ||
XMPMeta meta = new XMPMetaImpl(); | ||
meta.SetProperty(XMPConst.NS_PDFUA_ID, XMPConst.PART, "3"); | ||
PdfConformance level = PdfConformance.GetConformance(meta); | ||
NUnit.Framework.Assert.IsNull(level.GetUAConformance()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.