From 0fea50ec69487ed0bc1e6531d9326abf16cd2deb Mon Sep 17 00:00:00 2001 From: Jeahoon Jung Date: Sat, 3 Aug 2024 14:52:55 +1200 Subject: [PATCH] Fix semantic error in MatchersFixture.cs test The second parameter of `Enumberable.Range` should be the count, not the end number --- src/Moq.Tests/MatchersFixture.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Moq.Tests/MatchersFixture.cs b/src/Moq.Tests/MatchersFixture.cs index 67d0f86fc..468e28a8d 100644 --- a/src/Moq.Tests/MatchersFixture.cs +++ b/src/Moq.Tests/MatchersFixture.cs @@ -70,7 +70,7 @@ public void MatchesIsInEnumerable() var mock = new Mock(); mock.Setup(x => x.Echo(It.IsIn(Enumerable.Range(1, 5)))).Returns(1); - mock.Setup(x => x.Echo(It.IsIn(Enumerable.Range(6, 10)))).Returns(2); + mock.Setup(x => x.Echo(It.IsIn(Enumerable.Range(6, 5)))).Returns(2); Assert.Equal(1, mock.Object.Echo(1)); Assert.Equal(1, mock.Object.Echo(2)); @@ -121,7 +121,7 @@ public void MatchesIsNotInEnumerable() var mock = new Mock(); 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); + mock.Setup(x => x.Echo(It.IsNotIn(Enumerable.Range(6, 5)))).Returns(2); Assert.Equal(2, mock.Object.Echo(1)); Assert.Equal(2, mock.Object.Echo(2));