public void Apply_WithNullForContext_ThrowsException()
        {
            var sut = new HttpFunctionHeaderParameterFilter();

            Action action = () => sut.Apply(_operation, null);

            action.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("context");
        }
        public void Apply_WithNullForOperation_ThrowsException()
        {
            var sut     = new HttpFunctionHeaderParameterFilter();
            var context = A.Fake <OperationFilterContext>();

            Action action = () => sut.Apply(null, context);

            action.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("operation");
        }
        public void Apply_NoOwnHeaderParameters_ReturnsCorrectResult()
        {
            var method            = GetMethodInfo(nameof(FunctionMethodTestSource.NoOwnHeaderParameters));
            var expectedResultIds = _functionMethodTestSource.NoOwnHeaderParameters();
            var context           = CreateOperationFilterContext(method);

            var sut = new HttpFunctionHeaderParameterFilter();

            sut.Apply(_operation, context);

            ValidateResult(expectedResultIds);
        }