public void FormatMessageDoesNotThrowExceptionAlthoughTheParameterDoesNotExist() { const string messageFormat = "'{ValueName}' must be greater than or equal to '{ValueToCompare}'."; StringReplaceValidationMessageFormatter validationMessageFormatter = new StringReplaceValidationMessageFormatter(); Assert.AreEqual("'Age' must be greater than or equal to '{ValueToCompare}'.", validationMessageFormatter.FormatMessage(messageFormat, new Dictionary<string, string> { { "ValueName", "Age" } })); }
public void FormatMessage() { const string messageFormat = "'{ValueName}' must be greater than or equal to '{ValueToCompare}'."; StringReplaceValidationMessageFormatter validationMessageFormatter = new StringReplaceValidationMessageFormatter(); Assert.AreEqual("'Age' must be greater than or equal to '40'.", validationMessageFormatter.FormatMessage(messageFormat, new Dictionary<string, string> { { "ValueName", "Age" }, { "ValueToCompare", "40" } })); }