Exemplo n.º 1
0
        public async Task ContainsPrefixAsync_WithNonEmptyCollection_ReturnsTrueForKnownPrefixes()
        {
            // Arrange
            var valueProvider = new ReadableStringCollectionValueProvider <TestValueProviderMetadata>(_backingStore, null);

            // Act & Assert
            Assert.True(await valueProvider.ContainsPrefixAsync("foo"));
            Assert.True(await valueProvider.ContainsPrefixAsync("bar"));
            Assert.True(await valueProvider.ContainsPrefixAsync("bar.baz"));
        }
        public async Task ContainsPrefixAsync_WithNonEmptyCollection_ReturnsTrueForKnownPrefixes()
        {
            // Arrange
            var valueProvider = new ReadableStringCollectionValueProvider(BindingSource.Query, _backingStore, null);

            // Act & Assert
            Assert.True(await valueProvider.ContainsPrefixAsync("foo"));
            Assert.True(await valueProvider.ContainsPrefixAsync("bar"));
            Assert.True(await valueProvider.ContainsPrefixAsync("bar.baz"));
        }
        public async Task ContainsPrefixAsync_WithNonEmptyCollection_ReturnsFalseForUnknownPrefix()
        {
            // Arrange
            var valueProvider = new ReadableStringCollectionValueProvider(BindingSource.Query, _backingStore, null);

            // Act
            var result = await valueProvider.ContainsPrefixAsync("biff");

            // Assert
            Assert.False(result);
        }
        public async Task ContainsPrefixAsync_WithNonEmptyCollection_ReturnsTrueForEmptyPrefix()
        {
            // Arrange
            var valueProvider = new ReadableStringCollectionValueProvider(_backingStore, null);

            // Act
            var result = await valueProvider.ContainsPrefixAsync("");

            // Assert
            Assert.True(result);
        }
Exemplo n.º 5
0
        public async Task ContainsPrefixAsync_WithNonEmptyCollection_ReturnsFalseForUnknownPrefix()
        {
            // Arrange
            var valueProvider = new ReadableStringCollectionValueProvider <TestValueProviderMetadata>(_backingStore, null);

            // Act
            var result = await valueProvider.ContainsPrefixAsync("biff");

            // Assert
            Assert.False(result);
        }
        public async Task ContainsPrefixAsync_WithNonEmptyCollection_ReturnsTrueForEmptyPrefix()
        {
            // Arrange
            var valueProvider = new ReadableStringCollectionValueProvider(BindingSource.Query, _backingStore, null);

            // Act
            var result = await valueProvider.ContainsPrefixAsync("");

            // Assert
            Assert.True(result);
        }
        public async Task ContainsPrefixAsync_WithEmptyCollection_ReturnsFalseForEmptyPrefix()
        {
            // Arrange
            var backingStore = new ReadableStringCollection(new Dictionary<string, string[]>());
            var valueProvider = new ReadableStringCollectionValueProvider(BindingSource.Query, backingStore, null);

            // Act
            var result = await valueProvider.ContainsPrefixAsync("");

            // Assert
            Assert.False(result);
        }
Exemplo n.º 8
0
        public async Task ContainsPrefixAsync_WithEmptyCollection_ReturnsFalseForEmptyPrefix()
        {
            // Arrange
            var backingStore  = new ReadableStringCollection(new Dictionary <string, string[]>());
            var valueProvider = new ReadableStringCollectionValueProvider <TestValueProviderMetadata>(backingStore, null);

            // Act
            var result = await valueProvider.ContainsPrefixAsync("");

            // Assert
            Assert.False(result);
        }