MOQ what happen if method setup intersect?
问题 What happen when two setup intersect or overlap if you prefer. For example, in the below scenario the setup overlap because obviously "aSpecificString" is also considered as any string. Interface ISomeInterface { int SomeMethod(string param); } [TestMethod] public void SomeClass_ShouldBehaveProperly_GivenSomeScenario() { var mock = new Mock<ISomeInterface>(MockBehavior.Strict); mock.Setup(m => m.SomeMethod("aSpecificString")) .Returns(100); mock.Setup(m => m.SomeMethod(It.IsAny<string>()))