From 39f69c8e56ca15fd2284eeb28507381d9556a503 Mon Sep 17 00:00:00 2001 From: Lukasz Wojciechowski Date: Mon, 27 Nov 2017 16:54:57 +0100 Subject: [PATCH] Add generated mocks for controller's internals mockgen -package mock -destination=controller/mock/boruter.go \ git.tizen.org/tools/weles/controller Boruter mockgen -package mock -destination=controller/mock/downloader.go \ git.tizen.org/tools/weles/controller Downloader mockgen -package mock -destination=controller/mock/dryader.go \ git.tizen.org/tools/weles/controller Dryader mockgen -package mock -destination=controller/mock/parser.go \ git.tizen.org/tools/weles/controller Parser Change-Id: Ie5fd939e0082c0f7975d2dbc416d730f28c311eb Signed-off-by: Lukasz Wojciechowski --- controller/mock/boruter.go | 87 +++++++++++++++++++++++++++++++++++++++++++ controller/mock/downloader.go | 77 ++++++++++++++++++++++++++++++++++++++ controller/mock/dryader.go | 87 +++++++++++++++++++++++++++++++++++++++++++ controller/mock/parser.go | 77 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 328 insertions(+) create mode 100644 controller/mock/boruter.go create mode 100644 controller/mock/downloader.go create mode 100644 controller/mock/dryader.go create mode 100644 controller/mock/parser.go diff --git a/controller/mock/boruter.go b/controller/mock/boruter.go new file mode 100644 index 0000000..a464cec --- /dev/null +++ b/controller/mock/boruter.go @@ -0,0 +1,87 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: git.tizen.org/tools/weles/controller (interfaces: Boruter) + +// Package mock is a generated GoMock package. +package mock + +import ( + weles "git.tizen.org/tools/weles" + notifier "git.tizen.org/tools/weles/controller/notifier" + gomock "github.com/golang/mock/gomock" + reflect "reflect" +) + +// MockBoruter is a mock of Boruter interface +type MockBoruter struct { + ctrl *gomock.Controller + recorder *MockBoruterMockRecorder +} + +// MockBoruterMockRecorder is the mock recorder for MockBoruter +type MockBoruterMockRecorder struct { + mock *MockBoruter +} + +// NewMockBoruter creates a new mock instance +func NewMockBoruter(ctrl *gomock.Controller) *MockBoruter { + mock := &MockBoruter{ctrl: ctrl} + mock.recorder = &MockBoruterMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockBoruter) EXPECT() *MockBoruterMockRecorder { + return m.recorder +} + +// Listen mocks base method +func (m *MockBoruter) Listen() <-chan notifier.Notification { + ret := m.ctrl.Call(m, "Listen") + ret0, _ := ret[0].(<-chan notifier.Notification) + return ret0 +} + +// Listen indicates an expected call of Listen +func (mr *MockBoruterMockRecorder) Listen() *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Listen", reflect.TypeOf((*MockBoruter)(nil).Listen)) +} + +// Release mocks base method +func (m *MockBoruter) Release(arg0 weles.JobID) { + m.ctrl.Call(m, "Release", arg0) +} + +// Release indicates an expected call of Release +func (mr *MockBoruterMockRecorder) Release(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockBoruter)(nil).Release), arg0) +} + +// Request mocks base method +func (m *MockBoruter) Request(arg0 weles.JobID) { + m.ctrl.Call(m, "Request", arg0) +} + +// Request indicates an expected call of Request +func (mr *MockBoruterMockRecorder) Request(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*MockBoruter)(nil).Request), arg0) +} + +// SendFail mocks base method +func (m *MockBoruter) SendFail(arg0 weles.JobID, arg1 string) { + m.ctrl.Call(m, "SendFail", arg0, arg1) +} + +// SendFail indicates an expected call of SendFail +func (mr *MockBoruterMockRecorder) SendFail(arg0, arg1 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendFail", reflect.TypeOf((*MockBoruter)(nil).SendFail), arg0, arg1) +} + +// SendOK mocks base method +func (m *MockBoruter) SendOK(arg0 weles.JobID) { + m.ctrl.Call(m, "SendOK", arg0) +} + +// SendOK indicates an expected call of SendOK +func (mr *MockBoruterMockRecorder) SendOK(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendOK", reflect.TypeOf((*MockBoruter)(nil).SendOK), arg0) +} diff --git a/controller/mock/downloader.go b/controller/mock/downloader.go new file mode 100644 index 0000000..d5b0948 --- /dev/null +++ b/controller/mock/downloader.go @@ -0,0 +1,77 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: git.tizen.org/tools/weles/controller (interfaces: Downloader) + +// Package mock is a generated GoMock package. +package mock + +import ( + weles "git.tizen.org/tools/weles" + notifier "git.tizen.org/tools/weles/controller/notifier" + gomock "github.com/golang/mock/gomock" + reflect "reflect" +) + +// MockDownloader is a mock of Downloader interface +type MockDownloader struct { + ctrl *gomock.Controller + recorder *MockDownloaderMockRecorder +} + +// MockDownloaderMockRecorder is the mock recorder for MockDownloader +type MockDownloaderMockRecorder struct { + mock *MockDownloader +} + +// NewMockDownloader creates a new mock instance +func NewMockDownloader(ctrl *gomock.Controller) *MockDownloader { + mock := &MockDownloader{ctrl: ctrl} + mock.recorder = &MockDownloaderMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockDownloader) EXPECT() *MockDownloaderMockRecorder { + return m.recorder +} + +// Download mocks base method +func (m *MockDownloader) Download(arg0 weles.JobID) { + m.ctrl.Call(m, "Download", arg0) +} + +// Download indicates an expected call of Download +func (mr *MockDownloaderMockRecorder) Download(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Download", reflect.TypeOf((*MockDownloader)(nil).Download), arg0) +} + +// Listen mocks base method +func (m *MockDownloader) Listen() <-chan notifier.Notification { + ret := m.ctrl.Call(m, "Listen") + ret0, _ := ret[0].(<-chan notifier.Notification) + return ret0 +} + +// Listen indicates an expected call of Listen +func (mr *MockDownloaderMockRecorder) Listen() *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Listen", reflect.TypeOf((*MockDownloader)(nil).Listen)) +} + +// SendFail mocks base method +func (m *MockDownloader) SendFail(arg0 weles.JobID, arg1 string) { + m.ctrl.Call(m, "SendFail", arg0, arg1) +} + +// SendFail indicates an expected call of SendFail +func (mr *MockDownloaderMockRecorder) SendFail(arg0, arg1 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendFail", reflect.TypeOf((*MockDownloader)(nil).SendFail), arg0, arg1) +} + +// SendOK mocks base method +func (m *MockDownloader) SendOK(arg0 weles.JobID) { + m.ctrl.Call(m, "SendOK", arg0) +} + +// SendOK indicates an expected call of SendOK +func (mr *MockDownloaderMockRecorder) SendOK(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendOK", reflect.TypeOf((*MockDownloader)(nil).SendOK), arg0) +} diff --git a/controller/mock/dryader.go b/controller/mock/dryader.go new file mode 100644 index 0000000..d51ad21 --- /dev/null +++ b/controller/mock/dryader.go @@ -0,0 +1,87 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: git.tizen.org/tools/weles/controller (interfaces: Dryader) + +// Package mock is a generated GoMock package. +package mock + +import ( + weles "git.tizen.org/tools/weles" + notifier "git.tizen.org/tools/weles/controller/notifier" + gomock "github.com/golang/mock/gomock" + reflect "reflect" +) + +// MockDryader is a mock of Dryader interface +type MockDryader struct { + ctrl *gomock.Controller + recorder *MockDryaderMockRecorder +} + +// MockDryaderMockRecorder is the mock recorder for MockDryader +type MockDryaderMockRecorder struct { + mock *MockDryader +} + +// NewMockDryader creates a new mock instance +func NewMockDryader(ctrl *gomock.Controller) *MockDryader { + mock := &MockDryader{ctrl: ctrl} + mock.recorder = &MockDryaderMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockDryader) EXPECT() *MockDryaderMockRecorder { + return m.recorder +} + +// Cancel mocks base method +func (m *MockDryader) Cancel(arg0 weles.JobID) { + m.ctrl.Call(m, "Cancel", arg0) +} + +// Cancel indicates an expected call of Cancel +func (mr *MockDryaderMockRecorder) Cancel(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockDryader)(nil).Cancel), arg0) +} + +// Listen mocks base method +func (m *MockDryader) Listen() <-chan notifier.Notification { + ret := m.ctrl.Call(m, "Listen") + ret0, _ := ret[0].(<-chan notifier.Notification) + return ret0 +} + +// Listen indicates an expected call of Listen +func (mr *MockDryaderMockRecorder) Listen() *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Listen", reflect.TypeOf((*MockDryader)(nil).Listen)) +} + +// SendFail mocks base method +func (m *MockDryader) SendFail(arg0 weles.JobID, arg1 string) { + m.ctrl.Call(m, "SendFail", arg0, arg1) +} + +// SendFail indicates an expected call of SendFail +func (mr *MockDryaderMockRecorder) SendFail(arg0, arg1 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendFail", reflect.TypeOf((*MockDryader)(nil).SendFail), arg0, arg1) +} + +// SendOK mocks base method +func (m *MockDryader) SendOK(arg0 weles.JobID) { + m.ctrl.Call(m, "SendOK", arg0) +} + +// SendOK indicates an expected call of SendOK +func (mr *MockDryaderMockRecorder) SendOK(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendOK", reflect.TypeOf((*MockDryader)(nil).SendOK), arg0) +} + +// Start mocks base method +func (m *MockDryader) Start(arg0 weles.JobID) { + m.ctrl.Call(m, "Start", arg0) +} + +// Start indicates an expected call of Start +func (mr *MockDryaderMockRecorder) Start(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockDryader)(nil).Start), arg0) +} diff --git a/controller/mock/parser.go b/controller/mock/parser.go new file mode 100644 index 0000000..70d3d2c --- /dev/null +++ b/controller/mock/parser.go @@ -0,0 +1,77 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: git.tizen.org/tools/weles/controller (interfaces: Parser) + +// Package mock is a generated GoMock package. +package mock + +import ( + weles "git.tizen.org/tools/weles" + notifier "git.tizen.org/tools/weles/controller/notifier" + gomock "github.com/golang/mock/gomock" + reflect "reflect" +) + +// MockParser is a mock of Parser interface +type MockParser struct { + ctrl *gomock.Controller + recorder *MockParserMockRecorder +} + +// MockParserMockRecorder is the mock recorder for MockParser +type MockParserMockRecorder struct { + mock *MockParser +} + +// NewMockParser creates a new mock instance +func NewMockParser(ctrl *gomock.Controller) *MockParser { + mock := &MockParser{ctrl: ctrl} + mock.recorder = &MockParserMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockParser) EXPECT() *MockParserMockRecorder { + return m.recorder +} + +// Listen mocks base method +func (m *MockParser) Listen() <-chan notifier.Notification { + ret := m.ctrl.Call(m, "Listen") + ret0, _ := ret[0].(<-chan notifier.Notification) + return ret0 +} + +// Listen indicates an expected call of Listen +func (mr *MockParserMockRecorder) Listen() *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Listen", reflect.TypeOf((*MockParser)(nil).Listen)) +} + +// Parse mocks base method +func (m *MockParser) Parse(arg0 weles.JobID) { + m.ctrl.Call(m, "Parse", arg0) +} + +// Parse indicates an expected call of Parse +func (mr *MockParserMockRecorder) Parse(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parse", reflect.TypeOf((*MockParser)(nil).Parse), arg0) +} + +// SendFail mocks base method +func (m *MockParser) SendFail(arg0 weles.JobID, arg1 string) { + m.ctrl.Call(m, "SendFail", arg0, arg1) +} + +// SendFail indicates an expected call of SendFail +func (mr *MockParserMockRecorder) SendFail(arg0, arg1 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendFail", reflect.TypeOf((*MockParser)(nil).SendFail), arg0, arg1) +} + +// SendOK mocks base method +func (m *MockParser) SendOK(arg0 weles.JobID) { + m.ctrl.Call(m, "SendOK", arg0) +} + +// SendOK indicates an expected call of SendOK +func (mr *MockParserMockRecorder) SendOK(arg0 interface{}) *gomock.Call { + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendOK", reflect.TypeOf((*MockParser)(nil).SendOK), arg0) +} -- 2.7.4