MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / TestValid

Method TestValid

Source/Engine/Tests/TestHtmlParser.cs:13–30  ·  view source on GitHub ↗
(string html)

Source from the content-addressed store, hash-verified

11 public class TestHtmlParser
12 {
13 [TestCase("")]
14 [TestCase("a")]
15 [TestCase("a\na")]
16 [TestCase("a\ra")]
17 [TestCase("<a>")]
18 [TestCase("<a/>")]
19 [TestCase("<a />")]
20 [TestCase("<a>b<a/>")]
21 [TestCase("<!-- -->")]
22 public void TestValid(string html)
23 {
24 var parser = new HtmlParser(html);
25 while (parser.ParseNext(out var tag))
26 {
27 Assert.IsNotNull(tag.Name);
28 Assert.IsNotNull(tag.Attributes);
29 }
30 }
31
32 [TestCase("b<a>b", ExpectedResult = new[] { "a" })]
33 [TestCase("b<a/>b", ExpectedResult = new[] { "a" })]

Callers

nothing calls this directly

Calls 2

ParseNextMethod · 0.80
IsNotNullMethod · 0.80

Tested by

no test coverage detected