The HasLen checker verifies that the obtained value has the provided length. In many cases this is superior to using Equals in conjuction with the len function because in case the check fails the value itself will be printed, instead of its length, providing more details for figuring the problem.

For example:

c.Assert(list, HasLen, 5)

HasLen is referenced in 0 repositories