Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public virtual string GetPath(string prefix, Type controllerType, MethodInfo methodInfo)
 {
     return(SwaggerExtensions.GetPath(prefix, controllerType, methodInfo));
 }