Skip to content

xUnit Fluent Validations

Jon P Smith edited this page Oct 13, 2017 · 2 revisions

I have included xUnit's fluent validation extensions, found at https://githu15.com/xunit/samples.xunit/tree/master/AssertExtensions, in my library. I find the fluent validation style much easier to work with than the assert method approach – its slightly shorter, and intellisence can suggest the fluent validation methods that are appropriate.

I have added two more fluent validation methods

  • ShouldStartWith(this string actualString, string expectedStartString)
  • ShouldEndWith(this string actualString, string expectedEndString)
Clone this wiki locally