private static string GetMessage(MockBehavior behavior, Invocation invocation, string message) { return(string.Format( CultureInfo.CurrentCulture, Resources.MockExceptionMessage, invocation.ToString(), behavior, message )); }
/// <summary> /// Returns the exception to be thrown when a strict mock has no setup that provides a return value for the specified invocation. /// </summary> internal static MockException ReturnValueRequired(Invocation invocation) { return(new MockException( MockExceptionReason.ReturnValueRequired, string.Format( CultureInfo.CurrentCulture, Resources.MockExceptionMessage, invocation.ToString(), MockBehavior.Strict, Resources.ReturnValueRequired))); }
/// <summary> /// Returns the exception to be thrown when a strict mock has no setup corresponding to the specified invocation. /// </summary> internal static MockException NoSetup(Invocation invocation) { return(new MockException( MockExceptionReason.NoSetup, string.Format( CultureInfo.CurrentCulture, Resources.MockExceptionMessage, invocation.ToString(), MockBehavior.Strict, Resources.NoSetup))); }