public void UnexpectedMethodCallOnReplayThrows()
        {
            MethodInfo endsWith = MethodCallTests.GetMethodInfo("EndsWith", "2");

            Assert.Throws <ExpectationViolationException>(
                "String.EndsWith(\"2\"); Expected #0, Actual #1.",
                () => replay.MethodCall(new FakeInvocation(endsWith), endsWith, "2"));
        }
        public void VerifyWhenMismatchArgsContainsNull()
        {
            MethodInfo endsWith = MethodCallTests.GetMethodInfo("EndsWith", "2");

            Assert.Throws <ExpectationViolationException>(
                "String.EndsWith(null); Expected #0, Actual #1.",
                () => replay.MethodCall(new FakeInvocation(endsWith), endsWith, new object[1] {
                null
            }));
        }
 private static MethodInfo CreateMethodInfo()
 {
     return(MethodCallTests.GetMethodInfo("StartsWith", ""));
 }