Skip to content

Commit 76cea42

Browse files
committed
Added AndContinuityTestBuilder for continuing with test cases
1 parent 3a036d7 commit 76cea42

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace MyWebApi.Builders.And
2+
{
3+
using System.Web.Http;
4+
5+
using Actions;
6+
using Contracts.And;
7+
8+
public class AndContinuityTestBuilder<TActionResult> : ActionResultTestBuilder<TActionResult>,
9+
IAndContinuityTestBuilder<TActionResult>
10+
{
11+
public AndContinuityTestBuilder(ApiController controller, string actionName, TActionResult actionResult)
12+
: base(controller, actionName, actionResult)
13+
{
14+
}
15+
}
16+
}

MyWebApi/Builders/And/AndTestBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ public AndTestBuilder(ApiController controller, string actionName, TActionResult
1313
{
1414
}
1515

16-
public void And()
16+
public IAndContinuityTestBuilder<TActionResult> And()
1717
{
18-
throw new System.NotImplementedException();
18+
return new AndContinuityTestBuilder<TActionResult>(this.Controller, this.ActionName, this.ActionResult);
1919
}
2020
}
2121
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace MyWebApi.Builders.Contracts.And
2+
{
3+
using Actions;
4+
5+
public interface IAndContinuityTestBuilder<out TActionResult> : IActionResultTestBuilder<TActionResult>
6+
{
7+
}
8+
}

MyWebApi/Builders/Contracts/And/IAndTestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
public interface IAndTestBuilder<out TActionResult>
44
{
5-
void And();
5+
IAndContinuityTestBuilder<TActionResult> And();
66
}
77
}

MyWebApi/MyWebApi.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@
5656
<Compile Include="Builders\Actions\ShouldReturnNotFound.cs" />
5757
<Compile Include="Builders\Actions\ShouldReturnStatusCode.cs" />
5858
<Compile Include="Builders\Actions\ShouldReturnUnauthorized.cs" />
59+
<Compile Include="Builders\And\AndContinuityTestBuilder.cs" />
5960
<Compile Include="Builders\And\AndTestBuilder.cs" />
6061
<Compile Include="Builders\BadRequests\BadRequestErrorMessageTestBuilder.cs" />
6162
<Compile Include="Builders\BadRequests\BadRequestTestBuilder.cs" />
6263
<Compile Include="Builders\Base\BaseTestBuilder.cs" />
6364
<Compile Include="Builders\Base\BaseTestBuilderWithActionResult.cs" />
65+
<Compile Include="Builders\Contracts\And\IAndContinuityTestBuilder.cs" />
6466
<Compile Include="Builders\Contracts\And\IAndTestBuilder.cs" />
6567
<Compile Include="Builders\Contracts\BadRequests\IBadRequestErrorMessageTestBuilder.cs" />
6668
<Compile Include="Builders\Contracts\BadRequests\IBadRequestTestBuilder.cs" />

0 commit comments

Comments
 (0)