public void Contains_CreateDecoratorInstanceWithAllowedExtensions_DoesntContainAllowedExtensions() { // arrange AllowedExtensionsDecorator allowedExtensions = new AllowedExtensionsDecorator(); // act, assert Assert.IsFalse(allowedExtensions.Contains("*.non_esisting_extension")); }
public void Contains_CreateDecoratorInstanceWithAllowedExtensions_ContainsAllowedExtensions() { // arrange AllowedExtensionsDecorator allowedExtensions = new AllowedExtensionsDecorator(); // act, assert Assert.IsTrue(allowedExtensions.Contains("*.ext1")); }
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)); } }