github.com/goravel/framework@v1.13.9/contracts/route/mocks/Route.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  // Route is an autogenerated mock type for the Route type
    15  type Route struct {
    16  	mock.Mock
    17  }
    18  
    19  // Any provides a mock function with given fields: relativePath, handler
    20  func (_m *Route) 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 *Route) Delete(relativePath string, handler http.HandlerFunc) {
    26  	_m.Called(relativePath, handler)
    27  }
    28  
    29  // Fallback provides a mock function with given fields: handler
    30  func (_m *Route) Fallback(handler http.HandlerFunc) {
    31  	_m.Called(handler)
    32  }
    33  
    34  // Get provides a mock function with given fields: relativePath, handler
    35  func (_m *Route) Get(relativePath string, handler http.HandlerFunc) {
    36  	_m.Called(relativePath, handler)
    37  }
    38  
    39  // GlobalMiddleware provides a mock function with given fields: middlewares
    40  func (_m *Route) GlobalMiddleware(middlewares ...http.Middleware) {
    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  	_m.Called(_ca...)
    48  }
    49  
    50  // Group provides a mock function with given fields: handler
    51  func (_m *Route) Group(handler route.GroupFunc) {
    52  	_m.Called(handler)
    53  }
    54  
    55  // Middleware provides a mock function with given fields: middlewares
    56  func (_m *Route) Middleware(middlewares ...http.Middleware) route.Router {
    57  	_va := make([]interface{}, len(middlewares))
    58  	for _i := range middlewares {
    59  		_va[_i] = middlewares[_i]
    60  	}
    61  	var _ca []interface{}
    62  	_ca = append(_ca, _va...)
    63  	ret := _m.Called(_ca...)
    64  
    65  	var r0 route.Router
    66  	if rf, ok := ret.Get(0).(func(...http.Middleware) route.Router); ok {
    67  		r0 = rf(middlewares...)
    68  	} else {
    69  		if ret.Get(0) != nil {
    70  			r0 = ret.Get(0).(route.Router)
    71  		}
    72  	}
    73  
    74  	return r0
    75  }
    76  
    77  // Options provides a mock function with given fields: relativePath, handler
    78  func (_m *Route) Options(relativePath string, handler http.HandlerFunc) {
    79  	_m.Called(relativePath, handler)
    80  }
    81  
    82  // Patch provides a mock function with given fields: relativePath, handler
    83  func (_m *Route) Patch(relativePath string, handler http.HandlerFunc) {
    84  	_m.Called(relativePath, handler)
    85  }
    86  
    87  // Post provides a mock function with given fields: relativePath, handler
    88  func (_m *Route) Post(relativePath string, handler http.HandlerFunc) {
    89  	_m.Called(relativePath, handler)
    90  }
    91  
    92  // Prefix provides a mock function with given fields: addr
    93  func (_m *Route) Prefix(addr string) route.Router {
    94  	ret := _m.Called(addr)
    95  
    96  	var r0 route.Router
    97  	if rf, ok := ret.Get(0).(func(string) route.Router); ok {
    98  		r0 = rf(addr)
    99  	} else {
   100  		if ret.Get(0) != nil {
   101  			r0 = ret.Get(0).(route.Router)
   102  		}
   103  	}
   104  
   105  	return r0
   106  }
   107  
   108  // Put provides a mock function with given fields: relativePath, handler
   109  func (_m *Route) Put(relativePath string, handler http.HandlerFunc) {
   110  	_m.Called(relativePath, handler)
   111  }
   112  
   113  // Resource provides a mock function with given fields: relativePath, controller
   114  func (_m *Route) Resource(relativePath string, controller http.ResourceController) {
   115  	_m.Called(relativePath, controller)
   116  }
   117  
   118  // Run provides a mock function with given fields: host
   119  func (_m *Route) Run(host ...string) error {
   120  	_va := make([]interface{}, len(host))
   121  	for _i := range host {
   122  		_va[_i] = host[_i]
   123  	}
   124  	var _ca []interface{}
   125  	_ca = append(_ca, _va...)
   126  	ret := _m.Called(_ca...)
   127  
   128  	var r0 error
   129  	if rf, ok := ret.Get(0).(func(...string) error); ok {
   130  		r0 = rf(host...)
   131  	} else {
   132  		r0 = ret.Error(0)
   133  	}
   134  
   135  	return r0
   136  }
   137  
   138  // RunTLS provides a mock function with given fields: host
   139  func (_m *Route) RunTLS(host ...string) error {
   140  	_va := make([]interface{}, len(host))
   141  	for _i := range host {
   142  		_va[_i] = host[_i]
   143  	}
   144  	var _ca []interface{}
   145  	_ca = append(_ca, _va...)
   146  	ret := _m.Called(_ca...)
   147  
   148  	var r0 error
   149  	if rf, ok := ret.Get(0).(func(...string) error); ok {
   150  		r0 = rf(host...)
   151  	} else {
   152  		r0 = ret.Error(0)
   153  	}
   154  
   155  	return r0
   156  }
   157  
   158  // RunTLSWithCert provides a mock function with given fields: host, certFile, keyFile
   159  func (_m *Route) RunTLSWithCert(host string, certFile string, keyFile string) error {
   160  	ret := _m.Called(host, certFile, keyFile)
   161  
   162  	var r0 error
   163  	if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
   164  		r0 = rf(host, certFile, keyFile)
   165  	} else {
   166  		r0 = ret.Error(0)
   167  	}
   168  
   169  	return r0
   170  }
   171  
   172  // ServeHTTP provides a mock function with given fields: writer, request
   173  func (_m *Route) ServeHTTP(writer nethttp.ResponseWriter, request *nethttp.Request) {
   174  	_m.Called(writer, request)
   175  }
   176  
   177  // Static provides a mock function with given fields: relativePath, root
   178  func (_m *Route) Static(relativePath string, root string) {
   179  	_m.Called(relativePath, root)
   180  }
   181  
   182  // StaticFS provides a mock function with given fields: relativePath, fs
   183  func (_m *Route) StaticFS(relativePath string, fs nethttp.FileSystem) {
   184  	_m.Called(relativePath, fs)
   185  }
   186  
   187  // StaticFile provides a mock function with given fields: relativePath, filepath
   188  func (_m *Route) StaticFile(relativePath string, filepath string) {
   189  	_m.Called(relativePath, filepath)
   190  }
   191  
   192  // NewRoute creates a new instance of Route. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   193  // The first argument is typically a *testing.T value.
   194  func NewRoute(t interface {
   195  	mock.TestingT
   196  	Cleanup(func())
   197  }) *Route {
   198  	mock := &Route{}
   199  	mock.Mock.Test(t)
   200  
   201  	t.Cleanup(func() { mock.AssertExpectations(t) })
   202  
   203  	return mock
   204  }