Duplicate the current BeNullOrEmpty() & NotBeNullOrEmpty() but test for NullOrWhiteSpace.
Example.
string actual = "ABCDEFGHI";
actual.Should().NotBeNullOrWhiteSpace() // does not throw exception.
string actual = " ";
actual.Should().NotBeNullOrWhiteSpace() // does throw exception.
Comments: ** Comment from web user: TimMurphy **
Example.
string actual = "ABCDEFGHI";
actual.Should().NotBeNullOrWhiteSpace() // does not throw exception.
string actual = " ";
actual.Should().NotBeNullOrWhiteSpace() // does throw exception.
Comments: ** Comment from web user: TimMurphy **
Thanks, BeBlank is more than likely going to cover 99.9% of cases for me.
However. BeBlank uses IsBlank where I was requested the use of String.IsNullOrWhiteSpace. IsBlank tests the string does not include spaces where String.IsNullOrWhiteSpace tests for all white-space characters including tab, new line, etc. See http://msdn.microsoft.com/en-us/library/system.string.isnullorwhitespace.aspx for more details.