Skip to content

Commit 752d032

Browse files
author
Muhammad Rehan Saeed
committed
Fix tests
1 parent ae7f0c8 commit 752d032

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Tests/Boxed.AspNetCore.Swagger.Test/OperationFilters/ClaimsOperationFilterTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public ClaimsOperationFilterTest()
3737
this.operationFilter = new ClaimsOperationFilter();
3838
this.operationFilterContext = new OperationFilterContext(
3939
this.apiDescription,
40-
new Mock<ISchemaRegistry>().Object);
40+
new Mock<ISchemaRegistry>().Object,
41+
this.GetType().GetMethods().First());
4142
}
4243

4344
[Fact]

Tests/Boxed.AspNetCore.Swagger.Test/OperationFilters/ForbiddenResponseOperationFilterTest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace Boxed.AspNetCore.Swagger.Test.OperationFilters
22
{
33
using System.Collections.Generic;
4+
using System.Linq;
45
using Boxed.AspNetCore.Swagger.OperationFilters;
56
using Microsoft.AspNetCore.Authorization;
67
using Microsoft.AspNetCore.Authorization.Infrastructure;
@@ -36,7 +37,8 @@ public ForbiddenResponseOperationFilterTest()
3637
this.operationFilter = new ForbiddenResponseOperationFilter();
3738
this.operationFilterContext = new OperationFilterContext(
3839
this.apiDescription,
39-
new Mock<ISchemaRegistry>().Object);
40+
new Mock<ISchemaRegistry>().Object,
41+
this.GetType().GetMethods().First());
4042
}
4143

4244
[Fact]

Tests/Boxed.AspNetCore.Swagger.Test/OperationFilters/UnauthorizedResponseOperationFilterTest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace Boxed.AspNetCore.Swagger.Test.OperationFilters
22
{
33
using System.Collections.Generic;
4+
using System.Linq;
45
using Boxed.AspNetCore.Swagger.OperationFilters;
56
using Microsoft.AspNetCore.Authorization;
67
using Microsoft.AspNetCore.Authorization.Infrastructure;
@@ -36,7 +37,8 @@ public UnauthorizedResponseOperationFilterTest()
3637
this.operationFilter = new UnauthorizedResponseOperationFilter();
3738
this.operationFilterContext = new OperationFilterContext(
3839
this.apiDescription,
39-
new Mock<ISchemaRegistry>().Object);
40+
new Mock<ISchemaRegistry>().Object,
41+
this.GetType().GetMethods().First());
4042
}
4143

4244
[Fact]

0 commit comments

Comments
 (0)