Skip to content

StringAssertions.NotHaveLength Method ​

Definition ​

Asserts that the string does not have the specified length.

c#
public AssertionsChain<StringAssertions, string> NotHaveLength(int expected);

View source

Parameters ​

NameTypeDescription
expectedInt32The length the string should not have.

Returns ​

AssertionsChain<StringAssertions, String>

An AssertionsChain<TAssertions, T> for chaining further assertions.