Ejemplo n.º 1
0
        public void FilterReturnsItself_ForAnyClassRegisteredAsGenericParam(IValueProviderMetadata metadata)
        {
            // Arrange
            var valueProvider = new ReadableStringCollectionValueProvider <TestValueProviderMetadata>(_backingStore, null);

            // Act
            var result = valueProvider.Filter(metadata);

            // Assert
            Assert.NotNull(result);
            Assert.IsType <ReadableStringCollectionValueProvider <TestValueProviderMetadata> >(result);
        }
        public void FilterExclude()
        {
            // Arrange
            var provider = new ReadableStringCollectionValueProvider(BindingSource.Query, _backingStore, null);

            var bindingSource = new BindingSource(
                "Test",
                displayName: null,
                isGreedy: true,
                isFromRequest: true);

            // Act
            var result = provider.Filter(bindingSource);

            // Assert
            Assert.Null(result);
        }
        public void FilterExclude()
        {
            // Arrange
            var provider = new ReadableStringCollectionValueProvider(BindingSource.Query, _backingStore, null);

            var bindingSource = new BindingSource(
                "Test",
                displayName: null,
                isGreedy: true,
                isFromRequest: true);

            // Act
            var result = provider.Filter(bindingSource);

            // Assert
            Assert.Null(result);
        }