...

Source file src/github.com/redhat-developer/odo/pkg/init/mock.go

Documentation: github.com/redhat-developer/odo/pkg/init

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: pkg/init/interface.go
     3  
     4  // Package init is a generated GoMock package.
     5  package init
     6  
     7  import (
     8  	context "context"
     9  	reflect "reflect"
    10  
    11  	v1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
    12  	parser "github.com/devfile/library/v2/pkg/devfile/parser"
    13  	gomock "github.com/golang/mock/gomock"
    14  	api "github.com/redhat-developer/odo/pkg/api"
    15  	filesystem "github.com/redhat-developer/odo/pkg/testingutil/filesystem"
    16  )
    17  
    18  // MockClient is a mock of Client interface.
    19  type MockClient struct {
    20  	ctrl     *gomock.Controller
    21  	recorder *MockClientMockRecorder
    22  }
    23  
    24  // MockClientMockRecorder is the mock recorder for MockClient.
    25  type MockClientMockRecorder struct {
    26  	mock *MockClient
    27  }
    28  
    29  // NewMockClient creates a new mock instance.
    30  func NewMockClient(ctrl *gomock.Controller) *MockClient {
    31  	mock := &MockClient{ctrl: ctrl}
    32  	mock.recorder = &MockClientMockRecorder{mock}
    33  	return mock
    34  }
    35  
    36  // EXPECT returns an object that allows the caller to indicate expected use.
    37  func (m *MockClient) EXPECT() *MockClientMockRecorder {
    38  	return m.recorder
    39  }
    40  
    41  // DownloadDevfile mocks base method.
    42  func (m *MockClient) DownloadDevfile(ctx context.Context, devfileLocation *api.DetectionResult, destDir string) (string, error) {
    43  	m.ctrl.T.Helper()
    44  	ret := m.ctrl.Call(m, "DownloadDevfile", ctx, devfileLocation, destDir)
    45  	ret0, _ := ret[0].(string)
    46  	ret1, _ := ret[1].(error)
    47  	return ret0, ret1
    48  }
    49  
    50  // DownloadDevfile indicates an expected call of DownloadDevfile.
    51  func (mr *MockClientMockRecorder) DownloadDevfile(ctx, devfileLocation, destDir interface{}) *gomock.Call {
    52  	mr.mock.ctrl.T.Helper()
    53  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadDevfile", reflect.TypeOf((*MockClient)(nil).DownloadDevfile), ctx, devfileLocation, destDir)
    54  }
    55  
    56  // DownloadStarterProject mocks base method.
    57  func (m *MockClient) DownloadStarterProject(project *v1alpha2.StarterProject, dest string) (bool, error) {
    58  	m.ctrl.T.Helper()
    59  	ret := m.ctrl.Call(m, "DownloadStarterProject", project, dest)
    60  	ret0, _ := ret[0].(bool)
    61  	ret1, _ := ret[1].(error)
    62  	return ret0, ret1
    63  }
    64  
    65  // DownloadStarterProject indicates an expected call of DownloadStarterProject.
    66  func (mr *MockClientMockRecorder) DownloadStarterProject(project, dest interface{}) *gomock.Call {
    67  	mr.mock.ctrl.T.Helper()
    68  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadStarterProject", reflect.TypeOf((*MockClient)(nil).DownloadStarterProject), project, dest)
    69  }
    70  
    71  // GetFlags mocks base method.
    72  func (m *MockClient) GetFlags(flags map[string]string) map[string]string {
    73  	m.ctrl.T.Helper()
    74  	ret := m.ctrl.Call(m, "GetFlags", flags)
    75  	ret0, _ := ret[0].(map[string]string)
    76  	return ret0
    77  }
    78  
    79  // GetFlags indicates an expected call of GetFlags.
    80  func (mr *MockClientMockRecorder) GetFlags(flags interface{}) *gomock.Call {
    81  	mr.mock.ctrl.T.Helper()
    82  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFlags", reflect.TypeOf((*MockClient)(nil).GetFlags), flags)
    83  }
    84  
    85  // HandleApplicationPorts mocks base method.
    86  func (m *MockClient) HandleApplicationPorts(devfileobj parser.DevfileObj, ports []int, flags map[string]string, fs filesystem.Filesystem, dir string) (parser.DevfileObj, error) {
    87  	m.ctrl.T.Helper()
    88  	ret := m.ctrl.Call(m, "HandleApplicationPorts", devfileobj, ports, flags, fs, dir)
    89  	ret0, _ := ret[0].(parser.DevfileObj)
    90  	ret1, _ := ret[1].(error)
    91  	return ret0, ret1
    92  }
    93  
    94  // HandleApplicationPorts indicates an expected call of HandleApplicationPorts.
    95  func (mr *MockClientMockRecorder) HandleApplicationPorts(devfileobj, ports, flags, fs, dir interface{}) *gomock.Call {
    96  	mr.mock.ctrl.T.Helper()
    97  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleApplicationPorts", reflect.TypeOf((*MockClient)(nil).HandleApplicationPorts), devfileobj, ports, flags, fs, dir)
    98  }
    99  
   100  // InitDevfile mocks base method.
   101  func (m *MockClient) InitDevfile(ctx context.Context, flags map[string]string, contextDir string, preInitHandlerFunc func(bool), newDevfileHandlerFunc func(parser.DevfileObj) error) error {
   102  	m.ctrl.T.Helper()
   103  	ret := m.ctrl.Call(m, "InitDevfile", ctx, flags, contextDir, preInitHandlerFunc, newDevfileHandlerFunc)
   104  	ret0, _ := ret[0].(error)
   105  	return ret0
   106  }
   107  
   108  // InitDevfile indicates an expected call of InitDevfile.
   109  func (mr *MockClientMockRecorder) InitDevfile(ctx, flags, contextDir, preInitHandlerFunc, newDevfileHandlerFunc interface{}) *gomock.Call {
   110  	mr.mock.ctrl.T.Helper()
   111  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitDevfile", reflect.TypeOf((*MockClient)(nil).InitDevfile), ctx, flags, contextDir, preInitHandlerFunc, newDevfileHandlerFunc)
   112  }
   113  
   114  // PersonalizeDevfileConfig mocks base method.
   115  func (m *MockClient) PersonalizeDevfileConfig(devfileobj parser.DevfileObj, flags map[string]string, fs filesystem.Filesystem, dir string) (parser.DevfileObj, error) {
   116  	m.ctrl.T.Helper()
   117  	ret := m.ctrl.Call(m, "PersonalizeDevfileConfig", devfileobj, flags, fs, dir)
   118  	ret0, _ := ret[0].(parser.DevfileObj)
   119  	ret1, _ := ret[1].(error)
   120  	return ret0, ret1
   121  }
   122  
   123  // PersonalizeDevfileConfig indicates an expected call of PersonalizeDevfileConfig.
   124  func (mr *MockClientMockRecorder) PersonalizeDevfileConfig(devfileobj, flags, fs, dir interface{}) *gomock.Call {
   125  	mr.mock.ctrl.T.Helper()
   126  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersonalizeDevfileConfig", reflect.TypeOf((*MockClient)(nil).PersonalizeDevfileConfig), devfileobj, flags, fs, dir)
   127  }
   128  
   129  // PersonalizeName mocks base method.
   130  func (m *MockClient) PersonalizeName(devfile parser.DevfileObj, flags map[string]string) (string, error) {
   131  	m.ctrl.T.Helper()
   132  	ret := m.ctrl.Call(m, "PersonalizeName", devfile, flags)
   133  	ret0, _ := ret[0].(string)
   134  	ret1, _ := ret[1].(error)
   135  	return ret0, ret1
   136  }
   137  
   138  // PersonalizeName indicates an expected call of PersonalizeName.
   139  func (mr *MockClientMockRecorder) PersonalizeName(devfile, flags interface{}) *gomock.Call {
   140  	mr.mock.ctrl.T.Helper()
   141  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersonalizeName", reflect.TypeOf((*MockClient)(nil).PersonalizeName), devfile, flags)
   142  }
   143  
   144  // SelectAndPersonalizeDevfile mocks base method.
   145  func (m *MockClient) SelectAndPersonalizeDevfile(ctx context.Context, flags map[string]string, contextDir string) (parser.DevfileObj, string, *api.DetectionResult, error) {
   146  	m.ctrl.T.Helper()
   147  	ret := m.ctrl.Call(m, "SelectAndPersonalizeDevfile", ctx, flags, contextDir)
   148  	ret0, _ := ret[0].(parser.DevfileObj)
   149  	ret1, _ := ret[1].(string)
   150  	ret2, _ := ret[2].(*api.DetectionResult)
   151  	ret3, _ := ret[3].(error)
   152  	return ret0, ret1, ret2, ret3
   153  }
   154  
   155  // SelectAndPersonalizeDevfile indicates an expected call of SelectAndPersonalizeDevfile.
   156  func (mr *MockClientMockRecorder) SelectAndPersonalizeDevfile(ctx, flags, contextDir interface{}) *gomock.Call {
   157  	mr.mock.ctrl.T.Helper()
   158  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectAndPersonalizeDevfile", reflect.TypeOf((*MockClient)(nil).SelectAndPersonalizeDevfile), ctx, flags, contextDir)
   159  }
   160  
   161  // SelectDevfile mocks base method.
   162  func (m *MockClient) SelectDevfile(ctx context.Context, flags map[string]string, fs filesystem.Filesystem, dir string) (*api.DetectionResult, error) {
   163  	m.ctrl.T.Helper()
   164  	ret := m.ctrl.Call(m, "SelectDevfile", ctx, flags, fs, dir)
   165  	ret0, _ := ret[0].(*api.DetectionResult)
   166  	ret1, _ := ret[1].(error)
   167  	return ret0, ret1
   168  }
   169  
   170  // SelectDevfile indicates an expected call of SelectDevfile.
   171  func (mr *MockClientMockRecorder) SelectDevfile(ctx, flags, fs, dir interface{}) *gomock.Call {
   172  	mr.mock.ctrl.T.Helper()
   173  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectDevfile", reflect.TypeOf((*MockClient)(nil).SelectDevfile), ctx, flags, fs, dir)
   174  }
   175  
   176  // SelectStarterProject mocks base method.
   177  func (m *MockClient) SelectStarterProject(devfile parser.DevfileObj, flags map[string]string, isEmptyDir bool) (*v1alpha2.StarterProject, error) {
   178  	m.ctrl.T.Helper()
   179  	ret := m.ctrl.Call(m, "SelectStarterProject", devfile, flags, isEmptyDir)
   180  	ret0, _ := ret[0].(*v1alpha2.StarterProject)
   181  	ret1, _ := ret[1].(error)
   182  	return ret0, ret1
   183  }
   184  
   185  // SelectStarterProject indicates an expected call of SelectStarterProject.
   186  func (mr *MockClientMockRecorder) SelectStarterProject(devfile, flags, isEmptyDir interface{}) *gomock.Call {
   187  	mr.mock.ctrl.T.Helper()
   188  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectStarterProject", reflect.TypeOf((*MockClient)(nil).SelectStarterProject), devfile, flags, isEmptyDir)
   189  }
   190  
   191  // Validate mocks base method.
   192  func (m *MockClient) Validate(flags map[string]string, fs filesystem.Filesystem, dir string) error {
   193  	m.ctrl.T.Helper()
   194  	ret := m.ctrl.Call(m, "Validate", flags, fs, dir)
   195  	ret0, _ := ret[0].(error)
   196  	return ret0
   197  }
   198  
   199  // Validate indicates an expected call of Validate.
   200  func (mr *MockClientMockRecorder) Validate(flags, fs, dir interface{}) *gomock.Call {
   201  	mr.mock.ctrl.T.Helper()
   202  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockClient)(nil).Validate), flags, fs, dir)
   203  }
   204  

View as plain text