public void MinDateTime_Message_AreEqual() { const string column = "MinDateTime"; const string message = "測試{0}{1}"; DateTime min = DateTime.Today; IFormValidator validator = provider.MinDateTime(min, message)(column, min.AddDays(-1).ToString("yyyy/MM/dd")); validator.Validate(); Assert.AreEqual(validator.ErrorMessage, string.Format(message, column, min)); }