public void TestParseInvalidSVGWithCommentOnTop() { Logger logger = new Logger(); logger.SetLogHandler(TestUtils.InitLogHandler()); HashSet <string> allResourceUris = new HashSet <string>(); RenderingTask.TextualDataResource tdr = new RenderingTask.TextualDataResource() { MimeType = "image/svg+xml", OriginalData = CommonUtils.ReadResourceBytes("Test.Eyes.Sdk.Core.DotNet.Resources.fa-regular-400.svg"), Data = CommonUtils.ReadResourceFile("Test.Eyes.Sdk.Core.DotNet.Resources.fa-regular-400.svg"), Uri = null }; RenderingTask.ParseSVG_(tdr, allResourceUris, logger); Assert.AreEqual(0, allResourceUris.Count); }
public void TestParseValidSVGWithLinks() { Logger logger = new Logger(); logger.SetLogHandler(TestUtils.InitLogHandler()); HashSet <string> allResourceUris = new HashSet <string>(); RenderingTask.TextualDataResource tdr = new RenderingTask.TextualDataResource() { MimeType = "image/svg+xml", OriginalData = CommonUtils.ReadResourceBytes("Test.Eyes.Sdk.Core.DotNet.Resources.applitools_logo_combined.svg"), Data = CommonUtils.ReadResourceFile("Test.Eyes.Sdk.Core.DotNet.Resources.applitools_logo_combined.svg"), Uri = new Uri("https://applitools.github.io/demo/TestPages/VisualGridTestPage/applitools_logo_combined.svg") }; RenderingTask.ParseSVG_(tdr, allResourceUris, logger); Assert.AreEqual(3, allResourceUris.Count); }