public void GetPath_Should_ReturnClearMethod() { var controllerType = typeof(StubController); var actual = SwaggerExtensions.GetPath("prefix", controllerType, controllerType.GetMethod(nameof(StubController.Clear))); const string expected = "/prefix/Stub/Clear()"; Assert.Equal(expected, actual); }
public void GetPath_Should_ReturnFullDeleteMethod() { var controllerType = typeof(StubController); var actual = SwaggerExtensions.GetPath("prefix", controllerType, controllerType.GetMethod(nameof(StubController.Delete))); const string expected = "/prefix/Stub/Delete(System.Guid id)"; Assert.Equal(expected, actual); }
public virtual string GetPath(string prefix, Type controllerType, MethodInfo methodInfo) { return(SwaggerExtensions.GetPath(prefix, controllerType, methodInfo)); }