コード例 #1
0
        public void Contains_CreateDecoratorInstanceWithAllowedExtensions_DoesntContainAllowedExtensions()
        {
            // arrange
            AllowedExtensionsDecorator allowedExtensions = new AllowedExtensionsDecorator();

            // act, assert
            Assert.IsFalse(allowedExtensions.Contains("*.non_esisting_extension"));
        }
コード例 #2
0
        public void Contains_CreateDecoratorInstanceWithAllowedExtensions_ContainsAllowedExtensions()
        {
            // arrange
            AllowedExtensionsDecorator allowedExtensions = new AllowedExtensionsDecorator();

            // act, assert
            Assert.IsTrue(allowedExtensions.Contains("*.ext1"));
        }
コード例 #3
0
        public void Contains_CreateDecoratorInstanceWithAllowedExtensions_DoesntContainAllowedExtensions()
        {
            // arrange
            AllowedExtensionsDecorator allowedExtensions = new AllowedExtensionsDecorator();

            // act, assert
            Assert.IsFalse(allowedExtensions.Contains("*.non_esisting_extension"));
        }
コード例 #4
0
        public void Contains_CreateDecoratorInstanceWithAllowedExtensions_ContainsAllowedExtensions()
        {
            // arrange
            AllowedExtensionsDecorator allowedExtensions = new AllowedExtensionsDecorator();

            // act, assert
            Assert.IsTrue(allowedExtensions.Contains("*.ext1"));
        }
コード例 #5
0
        public void Contains_CreateDecoratorInstanceWithAllowedExtensionsAndInjectAdditionalExtensions_ContainsAdditionalExtensions()
        {
            // arrange
            AdditionalExtensionsDecorator additionalExtensions = new AdditionalExtensionsDecorator();
            AllowedExtensionsDecorator    allowedExtensions    = new AllowedExtensionsDecorator(additionalExtensions);

            // act, assert
            foreach (string extension in additionalExtensions.AllowedExtensions)
            {
                Assert.IsTrue(allowedExtensions.Contains(extension));
            }
        }
コード例 #6
0
        public void Contains_CreateDecoratorInstanceWithAllowedExtensionsAndInjectAdditionalExtensions_ContainsAdditionalExtensions()
        {
            // arrange
            AdditionalExtensionsDecorator additionalExtensions = new AdditionalExtensionsDecorator();
            AllowedExtensionsDecorator allowedExtensions = new AllowedExtensionsDecorator(additionalExtensions);

            // act, assert
            foreach (string extension in additionalExtensions.AllowedExtensions)
            {
                Assert.IsTrue(allowedExtensions.Contains(extension));
            }
        }