public void ReturnProjectsGetActionWithCategoryIdParameter()
{
this.controller
.Calling(c => c.GetByCategory(2))
.ShouldHave()
.ActionAttributes(attr => attr.RestrictingForRequestsWithMethod(HttpMethod.Get))
.AndAlso()
.ShouldHave()
.ActionAttributes(attr => attr.ChangingRouteTo("~/api/projects/category/{id}"))
.AndAlso()
.ShouldReturn()
.Ok()
.WithResponseModelOfType<List<ProjectResponseModel>>()
.Passing(p =>
{
Assert.IsTrue(p.Count > 1);
Assert.IsTrue(p.First().Category.Id == 2);
});
}