示例#1
0
        public void RangeValidatorShouldReturnCorrectJson(string message, int min, int max)
        {
            //Arrange
            var validator = new RangeValidator(min, max, message);
            //Act
            var created = validator.CreateValidator();
            var json    = JsonConvert.SerializeObject(created);

            //Assert
            Assert.Equal($@"{{""range"":{{""min"":{min},""max"":{max}}},""message"":""{message}""}}", json);
        }