Marcin Ziąbek пре 1 месец
родитељ
комит
7b9cf0bfff

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
Source/QuestPDF.ConformanceTests/Resources/image.svg


+ 35 - 2
Source/QuestPDF.ConformanceTests/SvgTests.cs

@@ -1,6 +1,7 @@
 using QuestPDF.ConformanceTests.TestEngine;
 using QuestPDF.ConformanceTests.TestEngine;
 using QuestPDF.Drawing;
 using QuestPDF.Drawing;
 using QuestPDF.Fluent;
 using QuestPDF.Fluent;
+using QuestPDF.Helpers;
 
 
 namespace QuestPDF.ConformanceTests;
 namespace QuestPDF.ConformanceTests;
 
 
@@ -8,11 +9,43 @@ internal class SvgTests : ConformanceTestBase
 {
 {
     protected override Document GetDocumentUnderTest()
     protected override Document GetDocumentUnderTest()
     {
     {
-        throw new NotImplementedException();
+        return Document
+            .Create(document =>
+            {
+                document.Page(page =>
+                {
+                    page.Margin(60);
+
+                    page.Content()
+                        .Column(column =>
+                        {
+                            column.Spacing(25);
+
+                            column.Item()
+                                .SemanticHeader1()
+                                .Text("Conformance Test: SVG")
+                                .FontSize(24)
+                                .Bold()
+                                .FontColor(Colors.Blue.Darken2);
+
+                            column.Item()
+                                .Text("SVG content should be rendered correctly and possible to be annotated as semantic image. Image taken from: undraw.co");
+
+                            column.Item()
+                                .SemanticImage("Sample SVG image description")
+                                .Svg("Resources/image.svg");
+                        });
+                });
+            });
     }
     }
 
 
     protected override SemanticTreeNode? GetExpectedSemanticTree()
     protected override SemanticTreeNode? GetExpectedSemanticTree()
     {
     {
-        throw new NotImplementedException();
+        return ExpectedSemanticTree.DocumentRoot(root =>
+        {
+            root.Child("H1", h1 => h1.Alt("Conformance Test: SVG"));
+            root.Child("P");
+            root.Child("Figure", figure => figure.Alt("Sample SVG image description"));
+        });
     }
     }
 }
 }

Неке датотеке нису приказане због велике количине промена