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
184 changed files
with
1,966 additions
and
336 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2024 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 System; | ||
using iText.Svg.Renderers; | ||
using iText.Test; | ||
|
||
namespace iText.Svg.Css { | ||
[NUnit.Framework.Category("IntegrationTest")] | ||
public class BaselineTest : SvgIntegrationTest { | ||
public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext | ||
.CurrentContext.TestDirectory) + "/resources/itext/svg/css/BaselineTest/"; | ||
|
||
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory | ||
+ "/test/itext/svg/css/BaselineTest/"; | ||
|
||
[NUnit.Framework.OneTimeSetUp] | ||
public static void BeforeClass() { | ||
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void AlignmentBaselineTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "alignment-base"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void BaselineShiftTest() { | ||
//TODO DEVSIX-2507: change cmp file after supporting | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "baseline-shift"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void DominantBaselineTest() { | ||
//TODO DEVSIX-5890: update cmp file after supporting | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "dominant-baseline"); | ||
} | ||
} | ||
} |
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,77 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2024 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 System; | ||
using iText.Svg.Processors.Impl; | ||
using iText.Svg.Renderers; | ||
using iText.Test; | ||
|
||
namespace iText.Svg.Css { | ||
[NUnit.Framework.Category("IntegrationTest")] | ||
public class ColorTest : SvgIntegrationTest { | ||
public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext | ||
.CurrentContext.TestDirectory) + "/resources/itext/svg/css/ColorTest/"; | ||
|
||
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory | ||
+ "/test/itext/svg/css/ColorTest/"; | ||
|
||
[NUnit.Framework.OneTimeSetUp] | ||
public static void BeforeClass() { | ||
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void BackgroundColorTest() { | ||
//TODO DEVSIX-7156: update cmp file after supporting | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "background-color"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void CurrentColorTest() { | ||
//TODO DEVSIX-8758: update cmp file after supporting | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "current-color"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void InterpolationColorTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "color-interpolation"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void InterpolationFilterColorTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "color-interpolation-filter"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void ColorProfileTest() { | ||
//TODO DEVSIX-2259: update cmp after supporting | ||
SvgConverterProperties properties = new SvgConverterProperties().SetBaseUri(SOURCE_FOLDER); | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "color-profile", properties); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void ColorTypesTest() { | ||
//TODO DEVSIX-8748: update cmp files after supporting | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "color-types"); | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
itext.tests/itext.svg.tests/itext/svg/css/DirectionTest.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,47 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2024 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 System; | ||
using iText.Svg.Renderers; | ||
using iText.Test; | ||
|
||
namespace iText.Svg.Css { | ||
[NUnit.Framework.Category("IntegrationTest")] | ||
public class DirectionTest : SvgIntegrationTest { | ||
public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext | ||
.CurrentContext.TestDirectory) + "/resources/itext/svg/css/DirectionTest/"; | ||
|
||
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory | ||
+ "/test/itext/svg/css/DirectionTest/"; | ||
|
||
[NUnit.Framework.OneTimeSetUp] | ||
public static void BeforeClass() { | ||
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void DirectionAttributeTest() { | ||
//TODO DEVSIX-8779: update cmp file after supporting | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "direction"); | ||
} | ||
} | ||
} |
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,49 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2024 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 System; | ||
using iText.Svg.Logs; | ||
using iText.Svg.Renderers; | ||
using iText.Test; | ||
using iText.Test.Attributes; | ||
|
||
namespace iText.Svg.Css { | ||
[NUnit.Framework.Category("IntegrationTest")] | ||
public class DisplayTest : SvgIntegrationTest { | ||
public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext | ||
.CurrentContext.TestDirectory) + "/resources/itext/svg/css/DisplayTest/"; | ||
|
||
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory | ||
+ "/test/itext/svg/css/DisplayTest/"; | ||
|
||
[NUnit.Framework.OneTimeSetUp] | ||
public static void BeforeClass() { | ||
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
[LogMessage(SvgLogMessageConstant.UNMAPPED_TAG)] | ||
public virtual void DisplayAttributeTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "display"); | ||
} | ||
} | ||
} |
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,72 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2024 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 System; | ||
using iText.Svg.Renderers; | ||
using iText.Test; | ||
|
||
namespace iText.Svg.Css { | ||
[NUnit.Framework.Category("IntegrationTest")] | ||
public class FilterTest : SvgIntegrationTest { | ||
public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext | ||
.CurrentContext.TestDirectory) + "/resources/itext/svg/css/FilterTest/"; | ||
|
||
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory | ||
+ "/test/itext/svg/css/FilterTest/"; | ||
|
||
[NUnit.Framework.OneTimeSetUp] | ||
public static void BeforeClass() { | ||
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void BasicFilterTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "filter"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void FeGaussianBlurTest() { | ||
//TODO DEVSIX-8752: update cmp file after supporting | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "feGaussianBlur"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void PrimitiveUnitsTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "primitive-units"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void RadiusTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "radius"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void FloodAttributeTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "flood"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void LightingColorTest() { | ||
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "lighting-color"); | ||
} | ||
} | ||
} |
Oops, something went wrong.