public void AppliesTo_ActionWithoutApiBehavior_ReturnsFalse()
        {
            // Arrange
            var action = new ActionDescriptor()
            {
                FilterDescriptors = new List <FilterDescriptor>(),
            };
            var description = new ApiDescription()
            {
                ActionDescriptor = action,
            };

            var provider = new ApiBehaviorApiDescriptionProvider(new EmptyModelMetadataProvider());

            // Act
            var result = provider.AppliesTo(description);

            // Assert
            Assert.False(result);
        }
        public void AppliesTo_ActionWithApiBehavior_ReturnsTrue()
        {
            // Arrange
            var action = new ActionDescriptor()
            {
                FilterDescriptors = new List <FilterDescriptor>()
                {
                    new FilterDescriptor(Mock.Of <IApiBehaviorMetadata>(), FilterScope.Global),
                }
            };
            var description = new ApiDescription()
            {
                ActionDescriptor = action,
            };

            var provider = new ApiBehaviorApiDescriptionProvider(new EmptyModelMetadataProvider());

            // Act
            var result = provider.AppliesTo(description);

            // Assert
            Assert.True(result);
        }