- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 821
 
Closed
Description
Regarding the class Moq.Tests.MatchersFixture, given that the setups in the unit test method MatchesIsInVariadicParameters() are:
mock.Setup(x => x.Echo(It.IsIn(1, 2, 3, 4, 5))).Returns(1);
mock.Setup(x => x.Echo(It.IsIn(6, 7, 8, 9, 10))).Returns(2);then the ranges in MatchesIsNotInEnumerable():
mock.Setup(x => x.Echo(It.IsNotIn(Enumerable.Range(1, 5)))).Returns(1);
mock.Setup(x => x.Echo(It.IsNotIn(Enumerable.Range(6, 10)))).Returns(2);were probably meant to be:
mock.Setup(x => x.Echo(It.IsNotIn(Enumerable.Range(1, 5)))).Returns(1);
mock.Setup(x => x.Echo(It.IsNotIn(Enumerable.Range(6, 5)))).Returns(2);since the signature is Range(int start, int count), not Range(int start, int end).
 
 
The same is probably true for MatchesIsInEnumerable() given the ranges in MatchesRanges(), except that the latter is using an exclusive range for the second sequence.
