-
Notifications
You must be signed in to change notification settings - Fork 747
Closed
Description
When EmptyConstraint is used on the incorrect type, it throws the following exception:
throw new System.ArgumentException("The actual value must be a string or a non-null IEnumerable or DirectoryInfo", nameof(actual));
When chaining constraints, I sometimes hit this error message because of problems in my chaining, where I'm actually testing against a different type to the one I think I am. It would be useful if this error message included the type of actual
which caused the exception - so the user can better debug where the problem in their chaining lies.
Ideally, whoever contributes this functionality would also add a corresponding unit test! There may already be something there - I haven't checked. 🙂
jnm2