File tree Expand file tree Collapse file tree
src/MyTested.AspNetCore.Mvc.Controllers/Builders/Actions/ShouldReturn Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11namespace MyTested . AspNetCore . Mvc . Builders . Actions . ShouldReturn
22{
33 using System ;
4+ using ActionResults . ActionResult ;
45 using And ;
6+ using Contracts . ActionResults . ActionResult ;
57 using Contracts . Actions ;
68 using Contracts . And ;
79 using Internal . TestContexts ;
@@ -46,13 +48,15 @@ public ShouldReturnActionResultTestBuilder(ControllerTestContext testContext)
4648 return new AndTestBuilder ( this . TestContext ) ;
4749 }
4850
51+ /// <inheritdoc />
4952 public new IAndTestBuilder ActionResult < TResult > ( )
5053 {
5154 this . ValidateActionResult < TResult > ( ) ;
5255
5356 return new AndTestBuilder ( this . TestContext ) ;
5457 }
5558
59+ /// <inheritdoc />
5660 public new IAndTestBuilder ActionResult < TResult > (
5761 Action < IShouldReturnTestBuilder < TActionResult > > actionResultTestBuilder )
5862 {
@@ -63,6 +67,16 @@ public ShouldReturnActionResultTestBuilder(ControllerTestContext testContext)
6367 return new AndTestBuilder ( this . TestContext ) ;
6468 }
6569
70+ /// <inheritdoc />
71+ public new IAndTestBuilder ActionResult < TResult > ( Action < IActionResultOfTTestBuilder < TResult > > actionResultTestBuilder )
72+ {
73+ this . ValidateActionResult < TResult > ( ) ;
74+
75+ actionResultTestBuilder ? . Invoke ( new ActionResultOfTTestBuilder < TResult > ( this . TestContext ) ) ;
76+
77+ return new AndTestBuilder ( this . TestContext ) ;
78+ }
79+
6680 private void ValidateActionResults ( )
6781 => InvocationResultValidator . ValidateInvocationResultTypes (
6882 this . TestContext ,
You can’t perform that action at this time.
0 commit comments