isIn function
Returns a matcher that matches if the match argument is in the expected value. This is the converse of contains.
Implementation
Matcher isIn(expected) {
if (expected is Iterable) {
return new _In(expected, expected.contains);
} else if (expected is String) {
return new _In<Pattern>(expected, expected.contains);
} else if (expected is Map) {
return new _In(expected, expected.containsKey);
}
throw new ArgumentError.value(
expected, 'expected', 'Only Iterable, Map, and String are supported.');
}