Skip to content

Commit c9d630d

Browse files
ar3emiText-CI
authored andcommitted
Add tests with relative units in attributes of svg elements
DEVSIX-4834 Autoported commit. Original commit hash: [4847a533b]
1 parent 9f0cfd2 commit c9d630d

15 files changed

+104
-1
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using System;
2+
using iText.Svg.Renderers;
3+
using iText.Test;
4+
using iText.Test.Attributes;
5+
6+
namespace iText.Svg.Css {
7+
public class AttributesRelativeUnitTest : SvgIntegrationTest {
8+
public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
9+
.CurrentContext.TestDirectory) + "/resources/itext/svg/css/AttributesRelativeUnitTest/";
10+
11+
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
12+
+ "/test/itext/svg/css/AttributesRelativeUnitTest/";
13+
14+
[NUnit.Framework.OneTimeSetUp]
15+
public static void BeforeClass() {
16+
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER);
17+
}
18+
19+
[NUnit.Framework.Test]
20+
[LogMessage(iText.StyledXmlParser.LogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED, Count = 4)]
21+
public virtual void RectangleAttributesEmUnitsTest() {
22+
// TODO DEVSIX-4834 support relative units in attributes of svg elements. Remove log message at this test
23+
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "rectangleAttributesEmUnits");
24+
}
25+
26+
[NUnit.Framework.Test]
27+
[LogMessage(iText.StyledXmlParser.LogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED, Count = 4)]
28+
public virtual void RectangleAttributesExUnitsTest() {
29+
// TODO DEVSIX-4834 support relative units in attributes of svg elements. Remove log message at this test
30+
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "rectangleAttributesExUnits");
31+
}
32+
33+
[NUnit.Framework.Test]
34+
[LogMessage(iText.StyledXmlParser.LogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED, Count = 4)]
35+
public virtual void RectangleAttributesPercentUnitsTest() {
36+
// TODO DEVSIX-4834 support relative units in attributes of svg elements. Remove log message at this test
37+
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "rectangleAttributesPercentUnits");
38+
}
39+
40+
[NUnit.Framework.Test]
41+
[LogMessage(iText.StyledXmlParser.LogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED, Count = 4)]
42+
public virtual void ImageAttributesEmUnitsTest() {
43+
// TODO DEVSIX-4834 support relative units in attributes of svg elements. Remove log message at this test
44+
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "imageAttributesEmUnits");
45+
}
46+
47+
[NUnit.Framework.Test]
48+
[LogMessage(iText.StyledXmlParser.LogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED, Count = 4)]
49+
public virtual void ImageAttributesExUnitsTest() {
50+
// TODO DEVSIX-4834 support relative units in attributes of svg elements. Remove log message at this test
51+
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "imageAttributesExUnits");
52+
}
53+
54+
[NUnit.Framework.Test]
55+
[LogMessage(iText.StyledXmlParser.LogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED, Count = 4)]
56+
public virtual void ImageAttributesPercentUnitsTest() {
57+
// TODO DEVSIX-4834 support relative units in attributes of svg elements. Remove log message at this test
58+
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "imageAttributesPercentUnits");
59+
}
60+
}
61+
}
3.75 KB
Loading
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)