MyTested.AspNetCore.Mvc icon indicating copy to clipboard operation
MyTested.AspNetCore.Mvc copied to clipboard

Allow multiple results per controller test

Open ivaylokenov opened this issue 6 years ago • 0 comments

Sample tests should look like this:

MyController<MyMvcController>
    .Instance()
    .WithUser(user => user
        .WithUsername("MyUserName"))
    .Calling(c => c.Index())
    .ShouldReturn()
    .Ok()
    .But()
    .WithoutUser()
    .ShouldReturn()
    .Unathorized();

MyController<MyMvcController>
    .Instance()
    .Calling(c => c.Get(1))
    .ShouldReturn()
    .Ok()
    .But()
    .CallingWith(0)
    .ShouldReturn()
    .NotFound();

ivaylokenov avatar Jul 07 '19 10:07 ivaylokenov