public void GetRouteValuesForParameterLessMethodReturnsCorrectResult(
            ScalarRouteValuesQuery sut)
        {
            Expression<Action<FooController>> exp = c => c.GetDefault();
            var methodCallExp = (MethodCallExpression)exp.Body;

            var actual = sut.GetRouteValues(methodCallExp);

            Assert.Empty(actual);
        }
        public void GetParameterValueReturnsCorrectResult(
            int index,
            ScalarRouteValuesQuery sut,
            int id,
            string bar)
        {
            Expression<Action<BarController>> exp =
                c => c.GetWithIdAndQueryParameter(id, bar);
            var methodCallExp = (MethodCallExpression)exp.Body;
            var parameters = methodCallExp.Method.GetParameters();

            var actual =
                sut.GetParameterValues(methodCallExp, parameters[index]);

            var expected =
                new Dictionary<string, object>
                    {
                        { "id", id.ToString() },
                        { "bar", bar }
                    }
                    .ToArray()[index];
            Assert.Contains(expected, actual);
        }
 public void SutIsRouteValuesQuery(ScalarRouteValuesQuery sut)
 {
     Assert.IsAssignableFrom<IRouteValuesQuery>(sut);
 }