Skip to content

Commit

Permalink
Get rid of UAVeraPdfValidator
Browse files Browse the repository at this point in the history
Autoported commit.
Original commit hash: [3301bc3cd]
Manual files:
pdftest/src/main/java/com/itextpdf/test/pdfa/UAVeraPdfValidator.java
  • Loading branch information
vitali-pr committed Dec 21, 2023
1 parent c49378c commit f7b7aa0
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 50 deletions.
31 changes: 16 additions & 15 deletions itext.tests/itext.pdfua.tests/itext/pdfua/PdfUACanvasTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ You should have received a copy of the GNU Affero General Public License
using iText.Test.Pdfa;

namespace iText.Pdfua {
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
[NUnit.Framework.Category("UnitTest")]
public class PdfUACanvasTest : ExtendedITextTest {
private static readonly String FONT = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
Expand Down Expand Up @@ -84,7 +85,7 @@ public virtual void CheckPoint_01_005_TextContentIsCorrectlyTaggedAsContent() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_TextContentIsCorrectlyTaggedAsContent.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down Expand Up @@ -121,7 +122,7 @@ public virtual void CheckPoint_01_005_TextArtifactIsNotInTagTree() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_TextArtifactIsNotInTagTree.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down Expand Up @@ -177,7 +178,7 @@ public virtual void CheckPoint_01_005_TextGlyphLineContentIsArtifact() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_TextGlyphLineContentIsArtifact.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand All @@ -197,7 +198,7 @@ public virtual void CheckPoint_01_005_TextGlyphLineContentIsContentCorrect() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_TextGlyphLineContentIsContentCorrect.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand All @@ -216,7 +217,7 @@ public virtual void CheckPoint_01_005_allowPureBmcInArtifact() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_allowPureBmcInArtifact.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand All @@ -235,7 +236,7 @@ public virtual void CheckPoint_01_005_allowNestedPureBmcInArtifact() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_allowNestedPureBmcInArtifact.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down Expand Up @@ -280,7 +281,7 @@ public virtual void CheckPoint_01_005_LineContentThatIsMarkedAsArtifact() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_LineContentThatIsMarkedAsArtifact.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down Expand Up @@ -309,7 +310,7 @@ public virtual void CheckPoint_01_005_RectangleMarkedArtifact() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_RectangleMarkedArtifact.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down Expand Up @@ -341,7 +342,7 @@ public virtual void CheckPoint_01_005_RectangleMarkedContent() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_RectangleMarkedContent.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand All @@ -357,7 +358,7 @@ public virtual void CheckPoint_01_004_bezierMarkedAsContent() {
).SetStrokeColor(ColorConstants.RED).Arc(400, 400, 500, 500, 30, 50).Stroke().CloseTag().RestoreState(
);
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_004_bezierCurveShouldBeTagged.pdf"
, DESTINATION_FOLDER, "diff_"));
Expand All @@ -373,7 +374,7 @@ public virtual void CheckPoint_01_004_bezierMarkedAsArtifact() {
(5).SetStrokeColor(ColorConstants.RED).Arc(400, 400, 500, 500, 30, 50).Stroke().CloseTag().RestoreState
();
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_004_bezierMarkedAsArtifact.pdf"
, DESTINATION_FOLDER, "diff_"));
Expand Down Expand Up @@ -405,7 +406,7 @@ public virtual void CheckPoint_01_005_RandomOperationsWithoutActuallyAddingConte
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_01_005_RandomOperationsWithoutActuallyAddingContent.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down Expand Up @@ -448,7 +449,7 @@ public virtual void CheckPoint_validRoleAddedInsideMarkedContent() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_validRoleAddedInsideMarkedContent.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand All @@ -469,7 +470,7 @@ public virtual void CheckPoint_validRoleAddedInsideMarkedContentMultiple() {
, 12).MoveText(200, 200).ShowText("Hello World!").EndText().EndMarkedContent().BeginMarkedContent(PdfName
.H1).BeginText().ShowText("Hello but nested").EndText().EndMarkedContent().RestoreState().CloseTag();
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_validRoleAddedInsideMarkedContentMultiple.pdf"
, DESTINATION_FOLDER, "diff_"));
Expand All @@ -494,7 +495,7 @@ public virtual void CheckPoint_validRoleAddedInsideMarkedContentMCR_IN_MCR() {
)).BeginMarkedContent(PdfName.H1).BeginText().ShowText("Hello but nested").EndText().EndMarkedContent(
).CloseTag().RestoreState().CloseTag();
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_validRoleAddedInsideMarkedContentMCR_IN_MCR.pdf"
, DESTINATION_FOLDER, "diff_"));
Expand Down
7 changes: 4 additions & 3 deletions itext.tests/itext.pdfua.tests/itext/pdfua/PdfUALayoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ You should have received a copy of the GNU Affero General Public License
using iText.Test.Pdfa;

namespace iText.Pdfua {
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
[NUnit.Framework.Category("IntegrationTest")]
public class PdfUALayoutTest : ExtendedITextTest {
private static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
Expand Down Expand Up @@ -64,7 +65,7 @@ public virtual void SimpleParagraphTest() {
doc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff_"
));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand All @@ -82,7 +83,7 @@ public virtual void SimpleBorderTest() {
}
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff"
));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand All @@ -101,7 +102,7 @@ public virtual void SimpleTableTest() {
doc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff_"
));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ You should have received a copy of the GNU Affero General Public License
using iText.Test.Pdfa;

namespace iText.Pdfua {
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
[NUnit.Framework.Category("IntegrationTest")]
public class PdfUARoleMappingTest : ExtendedITextTest {
private static readonly String FONT = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
Expand Down Expand Up @@ -145,7 +146,7 @@ public virtual void StandardMappingViaTagTreePointer_02_001_Test() {
pdfDoc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff_"
));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down
5 changes: 3 additions & 2 deletions itext.tests/itext.pdfua.tests/itext/pdfua/PdfUATest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ You should have received a copy of the GNU Affero General Public License
using iText.Test.Pdfa;

namespace iText.Pdfua {
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
[NUnit.Framework.Category("IntegrationTest")]
public class PdfUATest : ExtendedITextTest {
private static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
Expand Down Expand Up @@ -95,7 +96,7 @@ public virtual void EmptyPageDocument() {
}
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_emptyPageDocument.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}

// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
Expand Down Expand Up @@ -148,7 +149,7 @@ public virtual void ManualPdfUaCreation() {
document.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outPdf, SOURCE_FOLDER + "cmp_manualPdfUaCreation.pdf"
, DESTINATION_FOLDER, "diff_"));
NUnit.Framework.Assert.IsNull(new UAVeraPdfValidator().Validate(outPdf));
NUnit.Framework.Assert.IsNull(new VeraPdfValidator().Validate(outPdf));
}
// Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf/ua validation on Android)
}
Expand Down
28 changes: 0 additions & 28 deletions itext/itext.pdftest/itext/test/pdfa/UAVeraPdfValidator.cs

This file was deleted.

2 changes: 1 addition & 1 deletion port-hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4a450b052fd7754561a7ced40a191e407ac5585b
3301bc3cd557931586ed42359df42fab31ad4419

0 comments on commit f7b7aa0

Please sign in to comment.