public void ShouldCallMethodBasedOnAttribute()
        {
            var request = CreateRequestContext("Fake", "FakeMethodToCall");
            var adapter = new AttributeBasedAdapter();

            _methodInvoker.InvokeAdapterMethod(request, adapter);

            Assert.IsTrue(adapter.WasMethodCalled(a => a.AttributeDecoratedName()));
        }
        public void ShouldCallMethodWithCorrectParametersBasedOnAttribute()
        {
            var request = CreateRequestContext("Fake", "FakeMethodToCall", query: "id=123&provider=fake&project=myProj");
            var adapter = new AttributeBasedAdapter();

            _methodInvoker.InvokeAdapterMethod(request, adapter);

            Assert.IsTrue(adapter.WasMethodCalled(
                a => a.AttributeDecoratedName(123, "fake", "myProj")));
        }
        private void ConfirmMethodIsCalledForHttpVerb(String httpVerb, Expression<Action<AttributeBasedAdapter>> expectedMethod)
        {
            var request = CreateRequestContext("Fake", "FakeMethodToCall", httpVerb);
            var adapter = new AttributeBasedAdapter();

            _methodInvoker.InvokeAdapterMethod(request, adapter);

            Assert.IsTrue(adapter.WasMethodCalled(expectedMethod));
        }