@manhng

Welcome to my blog!

HtmlTags

July 18, 2018 15:16

HtmlTags (edit)

  • Install-Package HtmlTags
  • Install-Package HtmlTags.AspNetCore
  • Install-Package xUnit
  • Install-Package Shouldly

https://github.com/HtmlTags/htmltags

Samples

var tag = new HtmlTag("span");
tag.Text("Hello & Goodbye");
tag.AddClass("important");
tag.Attr("title", "Greeting");

Unit tests

  • xUnit (xUnit.net is a developer testing framework, built to support Test Driven Development, with a design goal of extreme simplicity and alignment with framework features.)
  • Shouldly (Shouldly - Assertion framework for .NET. The way asserting *Should* be)

https://github.com/HtmlTags/htmltags/blob/master/test/HtmlTags.Testing/HtmlTagTester.cs

Categories

Recent posts