public void HasValidators_ReturnsTrue_IfModelIsDataSet()
        {
            // Arrange
            var provider = new DataSetValidatorProvider();
            var dataSet  = DataSet <Person> .Create();

            // Act
            var result = provider.HasValidators(dataSet.GetType(), Array.Empty <object>());

            // Assert
            Assert.True(result);
        }
        public void CreateValidators_ReturnsValidatorForDataSetType()
        {
            // Arrange
            var provider = new DataSetValidatorProvider();
            var dataSet  = DataSet <Person> .Create();

            var metadata = _metadataProvider.GetMetadataForType(dataSet.GetType());

            var providerContext = new ModelValidatorProviderContext(metadata, GetValidatorItems(metadata));

            // Act
            provider.CreateValidators(providerContext);

            // Assert
            var validatorItem = Assert.Single(providerContext.Results);

            Assert.IsType <DataSetValidator>(validatorItem.Validator);
        }