コード例 #1
0
        public void ContainsPrefix_ThrowsIfPrefixIsNull()
        {
            // Arrange
            HttpFileCollectionValueProvider valueProvider = GetValueProvider();

            // Act & assert
            Assert.ThrowsArgumentNull(
                delegate { valueProvider.ContainsPrefix(null); }, "prefix");
        }
コード例 #2
0
        public void ContainsPrefix_DoesNotContainEmptyPrefixIfBackingStoreIsEmpty()
        {
            // Arrange
            HttpFileCollectionValueProvider valueProvider = GetEmptyValueProvider();

            // Act
            bool result = valueProvider.ContainsPrefix("");

            // Assert
            Assert.IsFalse(result, "The '' prefix shouldn't have been present.");
        }
コード例 #3
0
        public void ContainsPrefix()
        {
            // Arrange
            HttpFileCollectionValueProvider valueProvider = GetValueProvider();

            // Act
            bool result = valueProvider.ContainsPrefix("bar");

            // Assert
            Assert.IsTrue(result);
        }
コード例 #4
0
        public void ContainsPrefix_DoesNotContainEmptyPrefixIfBackingStoreIsEmpty()
        {
            // Arrange
            HttpFileCollectionValueProvider valueProvider = GetEmptyValueProvider();

            // Act
            bool result = valueProvider.ContainsPrefix("");

            // Assert
            Assert.False(result);
        }