Ejemplo n.º 1
0
        public void EqualValidateFormat__String()
        {
            //Arrange
            var request  = new Mock <HttpRequestBase>();
            var value    = "helloworld";
            var field    = "文字";
            var single   = "abcdefg";
            var expected = "文字要跟abcdefg一樣";

            //Act
            RequestWrapper wrapper = new RequestWrapper(request.Object);

            wrapper.EqualValidate(value, single, true, field, "{0}要跟{1}一樣");
            var result = wrapper.GetErrorMessage(ErrorOuputType.Text);

            //Assert
            Assert.AreEqual(expected, result);
        }