Skip to content

Commit

Permalink
Merge pull request #27 from feeeper/form-tag-as-node-test
Browse files Browse the repository at this point in the history
Form tag as node test
  • Loading branch information
JackWFinlay authored Oct 20, 2016
2 parents 4bacd3e + ade5c9f commit b1af100
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Jsonize.Test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ public async Task TestCreatingJsonizeMetaObject()
JsonizeMeta jsonizeMeta = new JsonizeMeta(result, @"http://jackfinlay.com/?something=something" );
}

[Test]
public async Task TestFormNodeShouldBeNode()
{
JsonizeConfiguration jsonizeConfiguration = new JsonizeConfiguration();

Jsonize jsonize = new Jsonize("<html><head></head><body><form></form></body></html>");
var result = jsonize.ParseHtmlAsJsonString(jsonizeConfiguration);

Assert.AreEqual("{\"node\":\"Document\",\"child\":[{\"tag\":\"html\",\"child\":[{\"tag\":\"head\"},{\"tag\":\"body\",\"child\":[{\"tag\":\"form\"}]}]}]}",
result.Replace("\r\n", "").Replace(" ", ""));
}

private static async Task<JsonizeNode> TestJsonizeAsJsonizeNode()
{
if (_html == null)
Expand Down

0 comments on commit b1af100

Please sign in to comment.