public void GetClientValidationRules_ReturnsValidationParameters()
        {
            // Arrange
            var expected          = ValidationAttributeUtil.GetRequiredErrorMessage("Length");
            var provider          = TestModelMetadataProvider.CreateDefaultProvider();
            var metadata          = provider.GetMetadataForProperty(typeof(string), "Length");
            var attribute         = new RequiredAttribute();
            var adapter           = new RequiredAttributeAdapter(attribute);
            var serviceCollection = new ServiceCollection();
            var requestServices   = serviceCollection.BuildServiceProvider();
            var context           = new ClientModelValidationContext(metadata, provider, requestServices);

            // Act
            var rules = adapter.GetClientValidationRules(context);

            // Assert
            var rule = Assert.Single(rules);

            Assert.Equal("required", rule.ValidationType);
            Assert.Empty(rule.ValidationParameters);
            Assert.Equal(expected, rule.ErrorMessage);
        }