From 9f2ec64a7f6f2e991c2318f1afd21c4f1116f026 Mon Sep 17 00:00:00 2001 From: Gear <84141000+macgeargear@users.noreply.github.com> Date: Sat, 13 Jan 2024 22:43:00 +0700 Subject: [PATCH] chore: mock context --- src/mocks/router/context.mock.go | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/mocks/router/context.mock.go b/src/mocks/router/context.mock.go index df02a3c..9db2501 100644 --- a/src/mocks/router/context.mock.go +++ b/src/mocks/router/context.mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: ./src/app/router/context.go +// +// Generated by this command: +// +// mockgen -source ./src/app/router/context.go -destination ./src/mocks/router/context.mock.go +// // Package mock_router is a generated GoMock package. package mock_router @@ -34,7 +39,7 @@ func (m *MockIContext) EXPECT() *MockIContextMockRecorder { } // Bind mocks base method. -func (m *MockIContext) Bind(arg0 interface{}) error { +func (m *MockIContext) Bind(arg0 any) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Bind", arg0) ret0, _ := ret[0].(error) @@ -42,7 +47,7 @@ func (m *MockIContext) Bind(arg0 interface{}) error { } // Bind indicates an expected call of Bind. -func (mr *MockIContextMockRecorder) Bind(arg0 interface{}) *gomock.Call { +func (mr *MockIContextMockRecorder) Bind(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockIContext)(nil).Bind), arg0) } @@ -63,13 +68,13 @@ func (mr *MockIContextMockRecorder) ID() *gomock.Call { } // JSON mocks base method. -func (m *MockIContext) JSON(arg0 int, arg1 interface{}) { +func (m *MockIContext) JSON(arg0 int, arg1 any) { m.ctrl.T.Helper() m.ctrl.Call(m, "JSON", arg0, arg1) } // JSON indicates an expected call of JSON. -func (mr *MockIContextMockRecorder) JSON(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockIContextMockRecorder) JSON(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JSON", reflect.TypeOf((*MockIContext)(nil).JSON), arg0, arg1) } @@ -112,7 +117,7 @@ func (m *MockIContext) Param(arg0 string) (string, error) { } // Param indicates an expected call of Param. -func (mr *MockIContextMockRecorder) Param(arg0 interface{}) *gomock.Call { +func (mr *MockIContextMockRecorder) Param(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Param", reflect.TypeOf((*MockIContext)(nil).Param), arg0) } @@ -131,6 +136,20 @@ func (mr *MockIContextMockRecorder) Path() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Path", reflect.TypeOf((*MockIContext)(nil).Path)) } +// Queries mocks base method. +func (m *MockIContext) Queries() map[string]string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Queries") + ret0, _ := ret[0].(map[string]string) + return ret0 +} + +// Queries indicates an expected call of Queries. +func (mr *MockIContextMockRecorder) Queries() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Queries", reflect.TypeOf((*MockIContext)(nil).Queries)) +} + // Role mocks base method. func (m *MockIContext) Role() string { m.ctrl.T.Helper() @@ -152,7 +171,7 @@ func (m *MockIContext) StoreValue(arg0, arg1 string) { } // StoreValue indicates an expected call of StoreValue. -func (mr *MockIContextMockRecorder) StoreValue(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockIContextMockRecorder) StoreValue(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreValue", reflect.TypeOf((*MockIContext)(nil).StoreValue), arg0, arg1) }