Skip to content

Commit

Permalink
Use plain ActionDescriptor in test
Browse files Browse the repository at this point in the history
  • Loading branch information
captainsafia committed Jul 29, 2021
1 parent 05b3f45 commit 123380a
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Reflection;
using System.Text.Json;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.OpenApi.Models;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Routing;
Expand Down Expand Up @@ -84,11 +84,8 @@ public void GetSwagger_SetsOperationIdToRouteName_IfActionHasRouteNameMetadata()
public void GetSwagger_SetsOperationIdToEndpointName_IfActionHasEndpointNameMetadata()
{
var methodInfo = typeof(FakeController).GetMethod(nameof(FakeController.ActionWithParameter));
var actionDescriptor = new ControllerActionDescriptor
var actionDescriptor = new ActionDescriptor
{
ControllerTypeInfo = methodInfo.DeclaringType.GetTypeInfo(),
ControllerName = methodInfo.DeclaringType.Name,
MethodInfo = methodInfo,
EndpointMetadata = new List<object>() { new EndpointNameMetadata("SomeEndpointName") },
RouteValues = new Dictionary<string, string>
{
Expand Down

0 comments on commit 123380a

Please sign in to comment.