github.com/goravel/framework@v1.13.9/contracts/route/mocks/Router.go (about) 1 // Code generated by mockery v2.33.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 http "github.com/goravel/framework/contracts/http" 7 mock "github.com/stretchr/testify/mock" 8 9 nethttp "net/http" 10 11 route "github.com/goravel/framework/contracts/route" 12 ) 13 14 // Router is an autogenerated mock type for the Router type 15 type Router struct { 16 mock.Mock 17 } 18 19 // Any provides a mock function with given fields: relativePath, handler 20 func (_m *Router) Any(relativePath string, handler http.HandlerFunc) { 21 _m.Called(relativePath, handler) 22 } 23 24 // Delete provides a mock function with given fields: relativePath, handler 25 func (_m *Router) Delete(relativePath string, handler http.HandlerFunc) { 26 _m.Called(relativePath, handler) 27 } 28 29 // Get provides a mock function with given fields: relativePath, handler 30 func (_m *Router) Get(relativePath string, handler http.HandlerFunc) { 31 _m.Called(relativePath, handler) 32 } 33 34 // Group provides a mock function with given fields: handler 35 func (_m *Router) Group(handler route.GroupFunc) { 36 _m.Called(handler) 37 } 38 39 // Middleware provides a mock function with given fields: middlewares 40 func (_m *Router) Middleware(middlewares ...http.Middleware) route.Router { 41 _va := make([]interface{}, len(middlewares)) 42 for _i := range middlewares { 43 _va[_i] = middlewares[_i] 44 } 45 var _ca []interface{} 46 _ca = append(_ca, _va...) 47 ret := _m.Called(_ca...) 48 49 var r0 route.Router 50 if rf, ok := ret.Get(0).(func(...http.Middleware) route.Router); ok { 51 r0 = rf(middlewares...) 52 } else { 53 if ret.Get(0) != nil { 54 r0 = ret.Get(0).(route.Router) 55 } 56 } 57 58 return r0 59 } 60 61 // Options provides a mock function with given fields: relativePath, handler 62 func (_m *Router) Options(relativePath string, handler http.HandlerFunc) { 63 _m.Called(relativePath, handler) 64 } 65 66 // Patch provides a mock function with given fields: relativePath, handler 67 func (_m *Router) Patch(relativePath string, handler http.HandlerFunc) { 68 _m.Called(relativePath, handler) 69 } 70 71 // Post provides a mock function with given fields: relativePath, handler 72 func (_m *Router) Post(relativePath string, handler http.HandlerFunc) { 73 _m.Called(relativePath, handler) 74 } 75 76 // Prefix provides a mock function with given fields: addr 77 func (_m *Router) Prefix(addr string) route.Router { 78 ret := _m.Called(addr) 79 80 var r0 route.Router 81 if rf, ok := ret.Get(0).(func(string) route.Router); ok { 82 r0 = rf(addr) 83 } else { 84 if ret.Get(0) != nil { 85 r0 = ret.Get(0).(route.Router) 86 } 87 } 88 89 return r0 90 } 91 92 // Put provides a mock function with given fields: relativePath, handler 93 func (_m *Router) Put(relativePath string, handler http.HandlerFunc) { 94 _m.Called(relativePath, handler) 95 } 96 97 // Resource provides a mock function with given fields: relativePath, controller 98 func (_m *Router) Resource(relativePath string, controller http.ResourceController) { 99 _m.Called(relativePath, controller) 100 } 101 102 // Static provides a mock function with given fields: relativePath, root 103 func (_m *Router) Static(relativePath string, root string) { 104 _m.Called(relativePath, root) 105 } 106 107 // StaticFS provides a mock function with given fields: relativePath, fs 108 func (_m *Router) StaticFS(relativePath string, fs nethttp.FileSystem) { 109 _m.Called(relativePath, fs) 110 } 111 112 // StaticFile provides a mock function with given fields: relativePath, filepath 113 func (_m *Router) StaticFile(relativePath string, filepath string) { 114 _m.Called(relativePath, filepath) 115 } 116 117 // NewRouter creates a new instance of Router. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 118 // The first argument is typically a *testing.T value. 119 func NewRouter(t interface { 120 mock.TestingT 121 Cleanup(func()) 122 }) *Router { 123 mock := &Router{} 124 mock.Mock.Test(t) 125 126 t.Cleanup(func() { mock.AssertExpectations(t) }) 127 128 return mock 129 }