public void MaxInt_Message_AreEqual() { const string column = "MaxInt"; const string message = "測試{0}{1}"; const int max = 3; IFormValidator validator = provider.MaxInt(max, message)(column, "4"); validator.Validate(); Assert.AreEqual(validator.ErrorMessage, string.Format(message, column, max)); }