Skip to content

Test is not working when route returns basic types #269

@ghost

Description

I have a very basic test controller:

public class StatusController : ApiController { [HttpGet] public bool IsAlive() { return true; } }

And the following test will throw an exception:

`
var route = "/api/Status/IsAlive";

        MyWebApi
            .Routes()
            .ShouldMap(route)
            .To<StatusController>(c => c.IsAlive());`

since it cannot convert the lambda expression to a MethodCallExpression.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions