mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 18:38:29 +00:00
chore: Regenerates mock files with pegomock v4.1.0 (#5090)
Signed-off-by: tkasuz <63289889+tkasuz@users.noreply.github.com>
This commit is contained in:
@@ -149,7 +149,7 @@ We use [pegomock](https://github.com/petergtz/pegomock) for mocking. If you're
|
||||
modifying any interfaces that are mocked, you'll need to regen the mocks for that
|
||||
interface.
|
||||
|
||||
Install using `go install github.com/petergtz/pegomock/pegomock`
|
||||
Install using `go install github.com/petergtz/pegomock/v4/pegomock@latest`
|
||||
|
||||
If you see errors like:
|
||||
```
|
||||
@@ -174,10 +174,8 @@ To regen the mock, run `go generate` on that file, e.g.
|
||||
go generate server/events/project_command_builder.go
|
||||
```
|
||||
|
||||
If you get an error about `pegomock` not being available, install it:
|
||||
```sh
|
||||
go get github.com/petergtz/pegomock/...
|
||||
```
|
||||
Alternatively, you can run `make go-generate` to execute `go generate` across all packages
|
||||
|
||||
|
||||
# Backporting Fixes
|
||||
Atlantis now uses a [cherry-pick-bot](https://github.com/googleapis/repo-automation-bots/tree/main/packages/cherry-pick-bot) from Google. The bot assists in maintaining changes across releases branches by easily cherry-picking changes via pull requests.
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockAzureDevopsRequestValidator) Validate(r *http.Request, user []by
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockAzureDevopsRequestValidator().")
|
||||
}
|
||||
params := []pegomock.Param{r, user, pass}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Validate", params, []reflect.Type{reflect.TypeOf((*[]byte)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []byte
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]byte)
|
||||
_params := []pegomock.Param{r, user, pass}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Validate", _params, []reflect.Type{reflect.TypeOf((*[]byte)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []byte
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]byte)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockAzureDevopsRequestValidator) VerifyWasCalledOnce() *VerifierMockAzureDevopsRequestValidator {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockAzureDevopsRequestValidator struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockAzureDevopsRequestValidator) Validate(r *http.Request, user []byte, pass []byte) *MockAzureDevopsRequestValidator_Validate_OngoingVerification {
|
||||
params := []pegomock.Param{r, user, pass}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Validate", params, verifier.timeout)
|
||||
_params := []pegomock.Param{r, user, pass}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Validate", _params, verifier.timeout)
|
||||
return &MockAzureDevopsRequestValidator_Validate_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,19 +98,25 @@ func (c *MockAzureDevopsRequestValidator_Validate_OngoingVerification) GetCaptur
|
||||
}
|
||||
|
||||
func (c *MockAzureDevopsRequestValidator_Validate_OngoingVerification) GetAllCapturedArguments() (_param0 []*http.Request, _param1 [][]byte, _param2 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
}
|
||||
}
|
||||
_param2 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.([]byte)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.([]byte)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockGithubRequestValidator) Validate(r *http.Request, secret []byte)
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGithubRequestValidator().")
|
||||
}
|
||||
params := []pegomock.Param{r, secret}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Validate", params, []reflect.Type{reflect.TypeOf((*[]byte)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []byte
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]byte)
|
||||
_params := []pegomock.Param{r, secret}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Validate", _params, []reflect.Type{reflect.TypeOf((*[]byte)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []byte
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]byte)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGithubRequestValidator) VerifyWasCalledOnce() *VerifierMockGithubRequestValidator {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockGithubRequestValidator struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGithubRequestValidator) Validate(r *http.Request, secret []byte) *MockGithubRequestValidator_Validate_OngoingVerification {
|
||||
params := []pegomock.Param{r, secret}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Validate", params, verifier.timeout)
|
||||
_params := []pegomock.Param{r, secret}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Validate", _params, verifier.timeout)
|
||||
return &MockGithubRequestValidator_Validate_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,15 +98,19 @@ func (c *MockGithubRequestValidator_Validate_OngoingVerification) GetCapturedArg
|
||||
}
|
||||
|
||||
func (c *MockGithubRequestValidator_Validate_OngoingVerification) GetAllCapturedArguments() (_param0 []*http.Request, _param1 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockGitlabRequestParserValidator) ParseAndValidate(r *http.Request,
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGitlabRequestParserValidator().")
|
||||
}
|
||||
params := []pegomock.Param{r, secret}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("ParseAndValidate", params, []reflect.Type{reflect.TypeOf((*interface{})(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 interface{}
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(interface{})
|
||||
_params := []pegomock.Param{r, secret}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("ParseAndValidate", _params, []reflect.Type{reflect.TypeOf((*interface{})(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 interface{}
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(interface{})
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGitlabRequestParserValidator) VerifyWasCalledOnce() *VerifierMockGitlabRequestParserValidator {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockGitlabRequestParserValidator struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGitlabRequestParserValidator) ParseAndValidate(r *http.Request, secret []byte) *MockGitlabRequestParserValidator_ParseAndValidate_OngoingVerification {
|
||||
params := []pegomock.Param{r, secret}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ParseAndValidate", params, verifier.timeout)
|
||||
_params := []pegomock.Param{r, secret}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ParseAndValidate", _params, verifier.timeout)
|
||||
return &MockGitlabRequestParserValidator_ParseAndValidate_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,15 +98,19 @@ func (c *MockGitlabRequestParserValidator_ParseAndValidate_OngoingVerification)
|
||||
}
|
||||
|
||||
func (c *MockGitlabRequestParserValidator_ParseAndValidate_OngoingVerification) GetAllCapturedArguments() (_param0 []*http.Request, _param1 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,15 +29,15 @@ func (mock *MockTemplateWriter) Execute(wr io.Writer, data interface{}) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockTemplateWriter().")
|
||||
}
|
||||
params := []pegomock.Param{wr, data}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Execute", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{wr, data}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Execute", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockTemplateWriter) VerifyWasCalledOnce() *VerifierMockTemplateWriter {
|
||||
@@ -78,8 +78,8 @@ type VerifierMockTemplateWriter struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockTemplateWriter) Execute(wr io.Writer, data interface{}) *MockTemplateWriter_Execute_OngoingVerification {
|
||||
params := []pegomock.Param{wr, data}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Execute", params, verifier.timeout)
|
||||
_params := []pegomock.Param{wr, data}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Execute", _params, verifier.timeout)
|
||||
return &MockTemplateWriter_Execute_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -94,15 +94,19 @@ func (c *MockTemplateWriter_Execute_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockTemplateWriter_Execute_OngoingVerification) GetAllCapturedArguments() (_param0 []io.Writer, _param1 []interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]io.Writer, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(io.Writer)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]io.Writer, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(io.Writer)
|
||||
}
|
||||
}
|
||||
_param1 = make([]interface{}, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(interface{})
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]interface{}, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockApplyLockChecker) CheckApplyLock() (locking.ApplyCommandLock, er
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockApplyLockChecker().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("CheckApplyLock", params, []reflect.Type{reflect.TypeOf((*locking.ApplyCommandLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 locking.ApplyCommandLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(locking.ApplyCommandLock)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("CheckApplyLock", _params, []reflect.Type{reflect.TypeOf((*locking.ApplyCommandLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 locking.ApplyCommandLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(locking.ApplyCommandLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockApplyLockChecker) VerifyWasCalledOnce() *VerifierMockApplyLockChecker {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockApplyLockChecker struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockApplyLockChecker) CheckApplyLock() *MockApplyLockChecker_CheckApplyLock_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CheckApplyLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CheckApplyLock", _params, verifier.timeout)
|
||||
return &MockApplyLockChecker_CheckApplyLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,53 +29,53 @@ func (mock *MockApplyLocker) CheckApplyLock() (locking.ApplyCommandLock, error)
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockApplyLocker().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("CheckApplyLock", params, []reflect.Type{reflect.TypeOf((*locking.ApplyCommandLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 locking.ApplyCommandLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(locking.ApplyCommandLock)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("CheckApplyLock", _params, []reflect.Type{reflect.TypeOf((*locking.ApplyCommandLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 locking.ApplyCommandLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(locking.ApplyCommandLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockApplyLocker) LockApply() (locking.ApplyCommandLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockApplyLocker().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("LockApply", params, []reflect.Type{reflect.TypeOf((*locking.ApplyCommandLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 locking.ApplyCommandLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(locking.ApplyCommandLock)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("LockApply", _params, []reflect.Type{reflect.TypeOf((*locking.ApplyCommandLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 locking.ApplyCommandLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(locking.ApplyCommandLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockApplyLocker) UnlockApply() error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockApplyLocker().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockApply", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockApply", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockApplyLocker) VerifyWasCalledOnce() *VerifierMockApplyLocker {
|
||||
@@ -116,8 +116,8 @@ type VerifierMockApplyLocker struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockApplyLocker) CheckApplyLock() *MockApplyLocker_CheckApplyLock_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CheckApplyLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CheckApplyLock", _params, verifier.timeout)
|
||||
return &MockApplyLocker_CheckApplyLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -133,8 +133,8 @@ func (c *MockApplyLocker_CheckApplyLock_OngoingVerification) GetAllCapturedArgum
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockApplyLocker) LockApply() *MockApplyLocker_LockApply_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "LockApply", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "LockApply", _params, verifier.timeout)
|
||||
return &MockApplyLocker_LockApply_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -150,8 +150,8 @@ func (c *MockApplyLocker_LockApply_OngoingVerification) GetAllCapturedArguments(
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockApplyLocker) UnlockApply() *MockApplyLocker_UnlockApply_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockApply", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockApply", _params, verifier.timeout)
|
||||
return &MockApplyLocker_UnlockApply_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,220 +30,220 @@ func (mock *MockBackend) CheckCommandLock(cmdName command.Name) (*command.Lock,
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{cmdName}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("CheckCommandLock", params, []reflect.Type{reflect.TypeOf((**command.Lock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *command.Lock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*command.Lock)
|
||||
_params := []pegomock.Param{cmdName}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("CheckCommandLock", _params, []reflect.Type{reflect.TypeOf((**command.Lock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *command.Lock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*command.Lock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) DeletePullStatus(pull models.PullRequest) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{pull}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePullStatus", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{pull}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePullStatus", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockBackend) GetLock(project models.Project, workspace string) (*models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{project, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetLock", params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*models.ProjectLock)
|
||||
_params := []pegomock.Param{project, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetLock", _params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) GetPullStatus(pull models.PullRequest) (*models.PullStatus, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{pull}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullStatus", params, []reflect.Type{reflect.TypeOf((**models.PullStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *models.PullStatus
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*models.PullStatus)
|
||||
_params := []pegomock.Param{pull}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullStatus", _params, []reflect.Type{reflect.TypeOf((**models.PullStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *models.PullStatus
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*models.PullStatus)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) List() ([]models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("List", params, []reflect.Type{reflect.TypeOf((*[]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]models.ProjectLock)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("List", _params, []reflect.Type{reflect.TypeOf((*[]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) LockCommand(cmdName command.Name, lockTime time.Time) (*command.Lock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{cmdName, lockTime}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("LockCommand", params, []reflect.Type{reflect.TypeOf((**command.Lock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *command.Lock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*command.Lock)
|
||||
_params := []pegomock.Param{cmdName, lockTime}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("LockCommand", _params, []reflect.Type{reflect.TypeOf((**command.Lock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *command.Lock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*command.Lock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) TryLock(lock models.ProjectLock) (bool, models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{lock}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 bool
|
||||
var ret1 models.ProjectLock
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(bool)
|
||||
_params := []pegomock.Param{lock}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", _params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 bool
|
||||
var _ret1 models.ProjectLock
|
||||
var _ret2 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(bool)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(models.ProjectLock)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(models.ProjectLock)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
if _result[2] != nil {
|
||||
_ret2 = _result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1, ret2
|
||||
return _ret0, _ret1, _ret2
|
||||
}
|
||||
|
||||
func (mock *MockBackend) Unlock(project models.Project, workspace string) (*models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{project, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Unlock", params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*models.ProjectLock)
|
||||
_params := []pegomock.Param{project, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Unlock", _params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) UnlockByPull(repoFullName string, pullNum int) ([]models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{repoFullName, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockByPull", params, []reflect.Type{reflect.TypeOf((*[]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]models.ProjectLock)
|
||||
_params := []pegomock.Param{repoFullName, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockByPull", _params, []reflect.Type{reflect.TypeOf((*[]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) UnlockCommand(cmdName command.Name) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{cmdName}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockCommand", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{cmdName}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockCommand", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockBackend) UpdateProjectStatus(pull models.PullRequest, workspace string, repoRelDir string, newStatus models.ProjectPlanStatus) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{pull, workspace, repoRelDir, newStatus}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateProjectStatus", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{pull, workspace, repoRelDir, newStatus}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateProjectStatus", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockBackend) UpdatePullWithResults(pull models.PullRequest, newResults []command.ProjectResult) (models.PullStatus, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockBackend().")
|
||||
}
|
||||
params := []pegomock.Param{pull, newResults}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdatePullWithResults", params, []reflect.Type{reflect.TypeOf((*models.PullStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 models.PullStatus
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(models.PullStatus)
|
||||
_params := []pegomock.Param{pull, newResults}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdatePullWithResults", _params, []reflect.Type{reflect.TypeOf((*models.PullStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 models.PullStatus
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(models.PullStatus)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockBackend) VerifyWasCalledOnce() *VerifierMockBackend {
|
||||
@@ -284,8 +284,8 @@ type VerifierMockBackend struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) CheckCommandLock(cmdName command.Name) *MockBackend_CheckCommandLock_OngoingVerification {
|
||||
params := []pegomock.Param{cmdName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CheckCommandLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{cmdName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CheckCommandLock", _params, verifier.timeout)
|
||||
return &MockBackend_CheckCommandLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -300,19 +300,21 @@ func (c *MockBackend_CheckCommandLock_OngoingVerification) GetCapturedArguments(
|
||||
}
|
||||
|
||||
func (c *MockBackend_CheckCommandLock_OngoingVerification) GetAllCapturedArguments() (_param0 []command.Name) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.Name)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) DeletePullStatus(pull models.PullRequest) *MockBackend_DeletePullStatus_OngoingVerification {
|
||||
params := []pegomock.Param{pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePullStatus", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePullStatus", _params, verifier.timeout)
|
||||
return &MockBackend_DeletePullStatus_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -327,19 +329,21 @@ func (c *MockBackend_DeletePullStatus_OngoingVerification) GetCapturedArguments(
|
||||
}
|
||||
|
||||
func (c *MockBackend_DeletePullStatus_OngoingVerification) GetAllCapturedArguments() (_param0 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) GetLock(project models.Project, workspace string) *MockBackend_GetLock_OngoingVerification {
|
||||
params := []pegomock.Param{project, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{project, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetLock", _params, verifier.timeout)
|
||||
return &MockBackend_GetLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -354,23 +358,27 @@ func (c *MockBackend_GetLock_OngoingVerification) GetCapturedArguments() (models
|
||||
}
|
||||
|
||||
func (c *MockBackend_GetLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) GetPullStatus(pull models.PullRequest) *MockBackend_GetPullStatus_OngoingVerification {
|
||||
params := []pegomock.Param{pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullStatus", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullStatus", _params, verifier.timeout)
|
||||
return &MockBackend_GetPullStatus_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -385,19 +393,21 @@ func (c *MockBackend_GetPullStatus_OngoingVerification) GetCapturedArguments() m
|
||||
}
|
||||
|
||||
func (c *MockBackend_GetPullStatus_OngoingVerification) GetAllCapturedArguments() (_param0 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) List() *MockBackend_List_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "List", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "List", _params, verifier.timeout)
|
||||
return &MockBackend_List_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -413,8 +423,8 @@ func (c *MockBackend_List_OngoingVerification) GetAllCapturedArguments() {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) LockCommand(cmdName command.Name, lockTime time.Time) *MockBackend_LockCommand_OngoingVerification {
|
||||
params := []pegomock.Param{cmdName, lockTime}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "LockCommand", params, verifier.timeout)
|
||||
_params := []pegomock.Param{cmdName, lockTime}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "LockCommand", _params, verifier.timeout)
|
||||
return &MockBackend_LockCommand_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -429,23 +439,27 @@ func (c *MockBackend_LockCommand_OngoingVerification) GetCapturedArguments() (co
|
||||
}
|
||||
|
||||
func (c *MockBackend_LockCommand_OngoingVerification) GetAllCapturedArguments() (_param0 []command.Name, _param1 []time.Time) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.Name)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
_param1 = make([]time.Time, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(time.Time)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]time.Time, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(time.Time)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) TryLock(lock models.ProjectLock) *MockBackend_TryLock_OngoingVerification {
|
||||
params := []pegomock.Param{lock}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{lock}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", _params, verifier.timeout)
|
||||
return &MockBackend_TryLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -460,19 +474,21 @@ func (c *MockBackend_TryLock_OngoingVerification) GetCapturedArguments() models.
|
||||
}
|
||||
|
||||
func (c *MockBackend_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectLock) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectLock, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectLock)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.ProjectLock, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.ProjectLock)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) Unlock(project models.Project, workspace string) *MockBackend_Unlock_OngoingVerification {
|
||||
params := []pegomock.Param{project, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Unlock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{project, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Unlock", _params, verifier.timeout)
|
||||
return &MockBackend_Unlock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -487,23 +503,27 @@ func (c *MockBackend_Unlock_OngoingVerification) GetCapturedArguments() (models.
|
||||
}
|
||||
|
||||
func (c *MockBackend_Unlock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) UnlockByPull(repoFullName string, pullNum int) *MockBackend_UnlockByPull_OngoingVerification {
|
||||
params := []pegomock.Param{repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockByPull", params, verifier.timeout)
|
||||
_params := []pegomock.Param{repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockByPull", _params, verifier.timeout)
|
||||
return &MockBackend_UnlockByPull_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -518,23 +538,27 @@ func (c *MockBackend_UnlockByPull_OngoingVerification) GetCapturedArguments() (s
|
||||
}
|
||||
|
||||
func (c *MockBackend_UnlockByPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) UnlockCommand(cmdName command.Name) *MockBackend_UnlockCommand_OngoingVerification {
|
||||
params := []pegomock.Param{cmdName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockCommand", params, verifier.timeout)
|
||||
_params := []pegomock.Param{cmdName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockCommand", _params, verifier.timeout)
|
||||
return &MockBackend_UnlockCommand_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -549,19 +573,21 @@ func (c *MockBackend_UnlockCommand_OngoingVerification) GetCapturedArguments() c
|
||||
}
|
||||
|
||||
func (c *MockBackend_UnlockCommand_OngoingVerification) GetAllCapturedArguments() (_param0 []command.Name) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.Name)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) UpdateProjectStatus(pull models.PullRequest, workspace string, repoRelDir string, newStatus models.ProjectPlanStatus) *MockBackend_UpdateProjectStatus_OngoingVerification {
|
||||
params := []pegomock.Param{pull, workspace, repoRelDir, newStatus}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateProjectStatus", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pull, workspace, repoRelDir, newStatus}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateProjectStatus", _params, verifier.timeout)
|
||||
return &MockBackend_UpdateProjectStatus_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -576,31 +602,39 @@ func (c *MockBackend_UpdateProjectStatus_OngoingVerification) GetCapturedArgumen
|
||||
}
|
||||
|
||||
func (c *MockBackend_UpdateProjectStatus_OngoingVerification) GetAllCapturedArguments() (_param0 []models.PullRequest, _param1 []string, _param2 []string, _param3 []models.ProjectPlanStatus) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]models.ProjectPlanStatus, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.ProjectPlanStatus)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]models.ProjectPlanStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(models.ProjectPlanStatus)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockBackend) UpdatePullWithResults(pull models.PullRequest, newResults []command.ProjectResult) *MockBackend_UpdatePullWithResults_OngoingVerification {
|
||||
params := []pegomock.Param{pull, newResults}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdatePullWithResults", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pull, newResults}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdatePullWithResults", _params, verifier.timeout)
|
||||
return &MockBackend_UpdatePullWithResults_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -615,15 +649,19 @@ func (c *MockBackend_UpdatePullWithResults_OngoingVerification) GetCapturedArgum
|
||||
}
|
||||
|
||||
func (c *MockBackend_UpdatePullWithResults_OngoingVerification) GetAllCapturedArguments() (_param0 []models.PullRequest, _param1 [][]command.ProjectResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]command.ProjectResult)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([][]command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.([]command.ProjectResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,95 +30,95 @@ func (mock *MockLocker) GetLock(key string) (*models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockLocker().")
|
||||
}
|
||||
params := []pegomock.Param{key}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetLock", params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*models.ProjectLock)
|
||||
_params := []pegomock.Param{key}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetLock", _params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockLocker) List() (map[string]models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockLocker().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("List", params, []reflect.Type{reflect.TypeOf((*map[string]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 map[string]models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(map[string]models.ProjectLock)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("List", _params, []reflect.Type{reflect.TypeOf((*map[string]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 map[string]models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(map[string]models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockLocker) TryLock(p models.Project, workspace string, pull models.PullRequest, user models.User) (locking.TryLockResponse, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockLocker().")
|
||||
}
|
||||
params := []pegomock.Param{p, workspace, pull, user}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", params, []reflect.Type{reflect.TypeOf((*locking.TryLockResponse)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 locking.TryLockResponse
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(locking.TryLockResponse)
|
||||
_params := []pegomock.Param{p, workspace, pull, user}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", _params, []reflect.Type{reflect.TypeOf((*locking.TryLockResponse)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 locking.TryLockResponse
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(locking.TryLockResponse)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockLocker) Unlock(key string) (*models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockLocker().")
|
||||
}
|
||||
params := []pegomock.Param{key}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Unlock", params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*models.ProjectLock)
|
||||
_params := []pegomock.Param{key}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Unlock", _params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockLocker) UnlockByPull(repoFullName string, pullNum int) ([]models.ProjectLock, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockLocker().")
|
||||
}
|
||||
params := []pegomock.Param{repoFullName, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockByPull", params, []reflect.Type{reflect.TypeOf((*[]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]models.ProjectLock)
|
||||
_params := []pegomock.Param{repoFullName, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UnlockByPull", _params, []reflect.Type{reflect.TypeOf((*[]models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockLocker) VerifyWasCalledOnce() *VerifierMockLocker {
|
||||
@@ -159,8 +159,8 @@ type VerifierMockLocker struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockLocker) GetLock(key string) *MockLocker_GetLock_OngoingVerification {
|
||||
params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetLock", _params, verifier.timeout)
|
||||
return &MockLocker_GetLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -175,19 +175,21 @@ func (c *MockLocker_GetLock_OngoingVerification) GetCapturedArguments() string {
|
||||
}
|
||||
|
||||
func (c *MockLocker_GetLock_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockLocker) List() *MockLocker_List_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "List", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "List", _params, verifier.timeout)
|
||||
return &MockLocker_List_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -203,8 +205,8 @@ func (c *MockLocker_List_OngoingVerification) GetAllCapturedArguments() {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockLocker) TryLock(p models.Project, workspace string, pull models.PullRequest, user models.User) *MockLocker_TryLock_OngoingVerification {
|
||||
params := []pegomock.Param{p, workspace, pull, user}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{p, workspace, pull, user}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", _params, verifier.timeout)
|
||||
return &MockLocker_TryLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -219,31 +221,39 @@ func (c *MockLocker_TryLock_OngoingVerification) GetCapturedArguments() (models.
|
||||
}
|
||||
|
||||
func (c *MockLocker_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string, _param2 []models.PullRequest, _param3 []models.User) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockLocker) Unlock(key string) *MockLocker_Unlock_OngoingVerification {
|
||||
params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Unlock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Unlock", _params, verifier.timeout)
|
||||
return &MockLocker_Unlock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -258,19 +268,21 @@ func (c *MockLocker_Unlock_OngoingVerification) GetCapturedArguments() string {
|
||||
}
|
||||
|
||||
func (c *MockLocker_Unlock_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockLocker) UnlockByPull(repoFullName string, pullNum int) *MockLocker_UnlockByPull_OngoingVerification {
|
||||
params := []pegomock.Param{repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockByPull", params, verifier.timeout)
|
||||
_params := []pegomock.Param{repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UnlockByPull", _params, verifier.timeout)
|
||||
return &MockLocker_UnlockByPull_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -285,15 +297,19 @@ func (c *MockLocker_UnlockByPull_OngoingVerification) GetCapturedArguments() (st
|
||||
}
|
||||
|
||||
func (c *MockLocker_UnlockByPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockKeySerializer) Serialize(key *go_version.Version) (string, error
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockKeySerializer().")
|
||||
}
|
||||
params := []pegomock.Param{key}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Serialize", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{key}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Serialize", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockKeySerializer) VerifyWasCalledOnce() *VerifierMockKeySerializer {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockKeySerializer struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockKeySerializer) Serialize(key *go_version.Version) *MockKeySerializer_Serialize_OngoingVerification {
|
||||
params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Serialize", params, verifier.timeout)
|
||||
_params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Serialize", _params, verifier.timeout)
|
||||
return &MockKeySerializer_Serialize_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,11 +98,13 @@ func (c *MockKeySerializer_Serialize_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockKeySerializer_Serialize_OngoingVerification) GetAllCapturedArguments() (_param0 []*go_version.Version) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*go_version.Version)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*go_version.Version)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockExecutionVersionCache) Get(key *go_version.Version) (string, err
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockExecutionVersionCache().")
|
||||
}
|
||||
params := []pegomock.Param{key}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Get", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{key}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Get", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockExecutionVersionCache) VerifyWasCalledOnce() *VerifierMockExecutionVersionCache {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockExecutionVersionCache struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockExecutionVersionCache) Get(key *go_version.Version) *MockExecutionVersionCache_Get_OngoingVerification {
|
||||
params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Get", params, verifier.timeout)
|
||||
_params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Get", _params, verifier.timeout)
|
||||
return &MockExecutionVersionCache_Get_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,11 +98,13 @@ func (c *MockExecutionVersionCache_Get_OngoingVerification) GetCapturedArguments
|
||||
}
|
||||
|
||||
func (c *MockExecutionVersionCache_Get_OngoingVerification) GetAllCapturedArguments() (_param0 []*go_version.Version) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*go_version.Version)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*go_version.Version)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -31,27 +31,27 @@ func (mock *MockAsyncTFExec) RunCommandAsync(ctx command.ProjectContext, path st
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockAsyncTFExec().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, path, args, envs, v, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("RunCommandAsync", params, []reflect.Type{reflect.TypeOf((*chan<- string)(nil)).Elem(), reflect.TypeOf((*<-chan models.Line)(nil)).Elem()})
|
||||
var ret0 chan<- string
|
||||
var ret1 <-chan models.Line
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
_params := []pegomock.Param{ctx, path, args, envs, v, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("RunCommandAsync", _params, []reflect.Type{reflect.TypeOf((*chan<- string)(nil)).Elem(), reflect.TypeOf((*<-chan models.Line)(nil)).Elem()})
|
||||
var _ret0 chan<- string
|
||||
var _ret1 <-chan models.Line
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
var ok bool
|
||||
ret0, ok = result[0].(chan string)
|
||||
_ret0, ok = _result[0].(chan string)
|
||||
if !ok {
|
||||
ret0 = result[0].(chan<- string)
|
||||
_ret0 = _result[0].(chan<- string)
|
||||
}
|
||||
}
|
||||
if result[1] != nil {
|
||||
if _result[1] != nil {
|
||||
var ok bool
|
||||
ret1, ok = result[1].(chan models.Line)
|
||||
_ret1, ok = _result[1].(chan models.Line)
|
||||
if !ok {
|
||||
ret1 = result[1].(<-chan models.Line)
|
||||
_ret1 = _result[1].(<-chan models.Line)
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockAsyncTFExec) VerifyWasCalledOnce() *VerifierMockAsyncTFExec {
|
||||
@@ -92,8 +92,8 @@ type VerifierMockAsyncTFExec struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockAsyncTFExec) RunCommandAsync(ctx command.ProjectContext, path string, args []string, envs map[string]string, v *go_version.Version, workspace string) *MockAsyncTFExec_RunCommandAsync_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, path, args, envs, v, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunCommandAsync", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, path, args, envs, v, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunCommandAsync", _params, verifier.timeout)
|
||||
return &MockAsyncTFExec_RunCommandAsync_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -108,31 +108,43 @@ func (c *MockAsyncTFExec_RunCommandAsync_OngoingVerification) GetCapturedArgumen
|
||||
}
|
||||
|
||||
func (c *MockAsyncTFExec_RunCommandAsync_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []string, _param2 [][]string, _param3 []map[string]string, _param4 []*go_version.Version, _param5 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.([]string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.([]string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(*go_version.Version)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(*go_version.Version)
|
||||
}
|
||||
}
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(string)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,23 +29,23 @@ func (mock *MockPostWorkflowHookRunner) Run(ctx models.WorkflowHookCommandContex
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPostWorkflowHookRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 string
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 string
|
||||
var _ret2 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(string)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(string)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
if _result[2] != nil {
|
||||
_ret2 = _result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1, ret2
|
||||
return _ret0, _ret1, _ret2
|
||||
}
|
||||
|
||||
func (mock *MockPostWorkflowHookRunner) VerifyWasCalledOnce() *VerifierMockPostWorkflowHookRunner {
|
||||
@@ -86,8 +86,8 @@ type VerifierMockPostWorkflowHookRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPostWorkflowHookRunner) Run(ctx models.WorkflowHookCommandContext, command string, shell string, shellArgs string, path string) *MockPostWorkflowHookRunner_Run_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockPostWorkflowHookRunner_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -102,27 +102,37 @@ func (c *MockPostWorkflowHookRunner_Run_OngoingVerification) GetCapturedArgument
|
||||
}
|
||||
|
||||
func (c *MockPostWorkflowHookRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []models.WorkflowHookCommandContext, _param1 []string, _param2 []string, _param3 []string, _param4 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.WorkflowHookCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.WorkflowHookCommandContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.WorkflowHookCommandContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.WorkflowHookCommandContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,23 +29,23 @@ func (mock *MockPreWorkflowHookRunner) Run(ctx models.WorkflowHookCommandContext
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPreWorkflowHookRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 string
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 string
|
||||
var _ret2 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(string)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(string)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
if _result[2] != nil {
|
||||
_ret2 = _result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1, ret2
|
||||
return _ret0, _ret1, _ret2
|
||||
}
|
||||
|
||||
func (mock *MockPreWorkflowHookRunner) VerifyWasCalledOnce() *VerifierMockPreWorkflowHookRunner {
|
||||
@@ -86,8 +86,8 @@ type VerifierMockPreWorkflowHookRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPreWorkflowHookRunner) Run(ctx models.WorkflowHookCommandContext, command string, shell string, shellArgs string, path string) *MockPreWorkflowHookRunner_Run_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, command, shell, shellArgs, path}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockPreWorkflowHookRunner_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -102,27 +102,37 @@ func (c *MockPreWorkflowHookRunner_Run_OngoingVerification) GetCapturedArguments
|
||||
}
|
||||
|
||||
func (c *MockPreWorkflowHookRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []models.WorkflowHookCommandContext, _param1 []string, _param2 []string, _param3 []string, _param4 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.WorkflowHookCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.WorkflowHookCommandContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.WorkflowHookCommandContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.WorkflowHookCommandContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,19 +30,19 @@ func (mock *MockPullApprovedChecker) PullIsApproved(logger logging.SimpleLogging
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPullApprovedChecker().")
|
||||
}
|
||||
params := []pegomock.Param{logger, baseRepo, pull}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("PullIsApproved", params, []reflect.Type{reflect.TypeOf((*models.ApprovalStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 models.ApprovalStatus
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(models.ApprovalStatus)
|
||||
_params := []pegomock.Param{logger, baseRepo, pull}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("PullIsApproved", _params, []reflect.Type{reflect.TypeOf((*models.ApprovalStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 models.ApprovalStatus
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(models.ApprovalStatus)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockPullApprovedChecker) VerifyWasCalledOnce() *VerifierMockPullApprovedChecker {
|
||||
@@ -83,8 +83,8 @@ type VerifierMockPullApprovedChecker struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPullApprovedChecker) PullIsApproved(logger logging.SimpleLogging, baseRepo models.Repo, pull models.PullRequest) *MockPullApprovedChecker_PullIsApproved_OngoingVerification {
|
||||
params := []pegomock.Param{logger, baseRepo, pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PullIsApproved", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, baseRepo, pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PullIsApproved", _params, verifier.timeout)
|
||||
return &MockPullApprovedChecker_PullIsApproved_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -99,19 +99,25 @@ func (c *MockPullApprovedChecker_PullIsApproved_OngoingVerification) GetCaptured
|
||||
}
|
||||
|
||||
func (c *MockPullApprovedChecker_PullIsApproved_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockRunner) Run(ctx command.ProjectContext, extraArgs []string, path
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockRunner) VerifyWasCalledOnce() *VerifierMockRunner {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockRunner) Run(ctx command.ProjectContext, extraArgs []string, path string, envs map[string]string) *MockRunner_Run_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockRunner_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,23 +98,31 @@ func (c *MockRunner_Run_OngoingVerification) GetCapturedArguments() (command.Pro
|
||||
}
|
||||
|
||||
func (c *MockRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 [][]string, _param2 []string, _param3 []map[string]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.([]string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,15 +30,15 @@ func (mock *MockStatusUpdater) UpdateProject(ctx command.ProjectContext, cmdName
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockStatusUpdater().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateProject", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateProject", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockStatusUpdater) VerifyWasCalledOnce() *VerifierMockStatusUpdater {
|
||||
@@ -79,8 +79,8 @@ type VerifierMockStatusUpdater struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockStatusUpdater) UpdateProject(ctx command.ProjectContext, cmdName command.Name, status models.CommitStatus, url string, res *command.ProjectResult) *MockStatusUpdater_UpdateProject_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateProject", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateProject", _params, verifier.timeout)
|
||||
return &MockStatusUpdater_UpdateProject_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -95,27 +95,37 @@ func (c *MockStatusUpdater_UpdateProject_OngoingVerification) GetCapturedArgumen
|
||||
}
|
||||
|
||||
func (c *MockStatusUpdater_UpdateProject_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []command.Name, _param2 []models.CommitStatus, _param3 []string, _param4 []*command.ProjectResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(command.Name)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]*command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(*command.ProjectResult)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]*command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(*command.ProjectResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -31,38 +31,38 @@ func (mock *MockVersionedExecutorWorkflow) EnsureExecutorVersion(log logging.Sim
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockVersionedExecutorWorkflow().")
|
||||
}
|
||||
params := []pegomock.Param{log, v}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("EnsureExecutorVersion", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{log, v}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("EnsureExecutorVersion", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockVersionedExecutorWorkflow) Run(ctx command.ProjectContext, executablePath string, envs map[string]string, workdir string, extraArgs []string) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockVersionedExecutorWorkflow().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, executablePath, envs, workdir, extraArgs}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx, executablePath, envs, workdir, extraArgs}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockVersionedExecutorWorkflow) VerifyWasCalledOnce() *VerifierMockVersionedExecutorWorkflow {
|
||||
@@ -103,8 +103,8 @@ type VerifierMockVersionedExecutorWorkflow struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockVersionedExecutorWorkflow) EnsureExecutorVersion(log logging.SimpleLogging, v *go_version.Version) *MockVersionedExecutorWorkflow_EnsureExecutorVersion_OngoingVerification {
|
||||
params := []pegomock.Param{log, v}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "EnsureExecutorVersion", params, verifier.timeout)
|
||||
_params := []pegomock.Param{log, v}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "EnsureExecutorVersion", _params, verifier.timeout)
|
||||
return &MockVersionedExecutorWorkflow_EnsureExecutorVersion_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -119,23 +119,27 @@ func (c *MockVersionedExecutorWorkflow_EnsureExecutorVersion_OngoingVerification
|
||||
}
|
||||
|
||||
func (c *MockVersionedExecutorWorkflow_EnsureExecutorVersion_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []*go_version.Version) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*go_version.Version)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*go_version.Version)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockVersionedExecutorWorkflow) Run(ctx command.ProjectContext, executablePath string, envs map[string]string, workdir string, extraArgs []string) *MockVersionedExecutorWorkflow_Run_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, executablePath, envs, workdir, extraArgs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, executablePath, envs, workdir, extraArgs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockVersionedExecutorWorkflow_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -150,27 +154,37 @@ func (c *MockVersionedExecutorWorkflow_Run_OngoingVerification) GetCapturedArgum
|
||||
}
|
||||
|
||||
func (c *MockVersionedExecutorWorkflow_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []string, _param2 []map[string]string, _param3 []string, _param4 [][]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(map[string]string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(map[string]string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.([]string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.([]string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -28,38 +28,38 @@ func (mock *MockExec) CombinedOutput(args []string, envs map[string]string, work
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockExec().")
|
||||
}
|
||||
params := []pegomock.Param{args, envs, workdir}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("CombinedOutput", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{args, envs, workdir}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("CombinedOutput", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockExec) LookPath(file string) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockExec().")
|
||||
}
|
||||
params := []pegomock.Param{file}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("LookPath", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{file}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("LookPath", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockExec) VerifyWasCalledOnce() *VerifierMockExec {
|
||||
@@ -100,8 +100,8 @@ type VerifierMockExec struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockExec) CombinedOutput(args []string, envs map[string]string, workdir string) *MockExec_CombinedOutput_OngoingVerification {
|
||||
params := []pegomock.Param{args, envs, workdir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CombinedOutput", params, verifier.timeout)
|
||||
_params := []pegomock.Param{args, envs, workdir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CombinedOutput", _params, verifier.timeout)
|
||||
return &MockExec_CombinedOutput_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -116,27 +116,33 @@ func (c *MockExec_CombinedOutput_OngoingVerification) GetCapturedArguments() ([]
|
||||
}
|
||||
|
||||
func (c *MockExec_CombinedOutput_OngoingVerification) GetAllCapturedArguments() (_param0 [][]string, _param1 []map[string]string, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.([]string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.([]string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(map[string]string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(map[string]string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockExec) LookPath(file string) *MockExec_LookPath_OngoingVerification {
|
||||
params := []pegomock.Param{file}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "LookPath", params, verifier.timeout)
|
||||
_params := []pegomock.Param{file}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "LookPath", _params, verifier.timeout)
|
||||
return &MockExec_LookPath_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -151,11 +157,13 @@ func (c *MockExec_LookPath_OngoingVerification) GetCapturedArguments() string {
|
||||
}
|
||||
|
||||
func (c *MockExec_LookPath_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,67 +29,67 @@ func (mock *MockFilePath) Join(elem ...string) models.FilePath {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockFilePath().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
_params := []pegomock.Param{}
|
||||
for _, param := range elem {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Join", params, []reflect.Type{reflect.TypeOf((*models.FilePath)(nil)).Elem()})
|
||||
var ret0 models.FilePath
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(models.FilePath)
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Join", _params, []reflect.Type{reflect.TypeOf((*models.FilePath)(nil)).Elem()})
|
||||
var _ret0 models.FilePath
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(models.FilePath)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockFilePath) NotExists() bool {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockFilePath().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("NotExists", params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var ret0 bool
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(bool)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("NotExists", _params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var _ret0 bool
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(bool)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockFilePath) Resolve() string {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockFilePath().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Resolve", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem()})
|
||||
var ret0 string
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Resolve", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockFilePath) Symlink(newname string) (models.FilePath, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockFilePath().")
|
||||
}
|
||||
params := []pegomock.Param{newname}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Symlink", params, []reflect.Type{reflect.TypeOf((*models.FilePath)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 models.FilePath
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(models.FilePath)
|
||||
_params := []pegomock.Param{newname}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Symlink", _params, []reflect.Type{reflect.TypeOf((*models.FilePath)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 models.FilePath
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(models.FilePath)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockFilePath) VerifyWasCalledOnce() *VerifierMockFilePath {
|
||||
@@ -130,11 +130,11 @@ type VerifierMockFilePath struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockFilePath) Join(elem ...string) *MockFilePath_Join_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
_params := []pegomock.Param{}
|
||||
for _, param := range elem {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Join", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Join", _params, verifier.timeout)
|
||||
return &MockFilePath_Join_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -149,14 +149,14 @@ func (c *MockFilePath_Join_OngoingVerification) GetCapturedArguments() []string
|
||||
}
|
||||
|
||||
func (c *MockFilePath_Join_OngoingVerification) GetAllCapturedArguments() (_param0 [][]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([][]string, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param0[u] = make([]string, len(params)-0)
|
||||
for x := 0; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param0[u][x-0] = params[x][u].(string)
|
||||
_param0[u] = make([]string, len(_params)-0)
|
||||
for x := 0; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param0[u][x-0] = _params[x][u].(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,8 +165,8 @@ func (c *MockFilePath_Join_OngoingVerification) GetAllCapturedArguments() (_para
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockFilePath) NotExists() *MockFilePath_NotExists_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "NotExists", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "NotExists", _params, verifier.timeout)
|
||||
return &MockFilePath_NotExists_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -182,8 +182,8 @@ func (c *MockFilePath_NotExists_OngoingVerification) GetAllCapturedArguments() {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockFilePath) Resolve() *MockFilePath_Resolve_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Resolve", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Resolve", _params, verifier.timeout)
|
||||
return &MockFilePath_Resolve_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -199,8 +199,8 @@ func (c *MockFilePath_Resolve_OngoingVerification) GetAllCapturedArguments() {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockFilePath) Symlink(newname string) *MockFilePath_Symlink_OngoingVerification {
|
||||
params := []pegomock.Param{newname}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Symlink", params, verifier.timeout)
|
||||
_params := []pegomock.Param{newname}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Symlink", _params, verifier.timeout)
|
||||
return &MockFilePath_Symlink_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -215,11 +215,13 @@ func (c *MockFilePath_Symlink_OngoingVerification) GetCapturedArguments() string
|
||||
}
|
||||
|
||||
func (c *MockFilePath_Symlink_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockSourceResolver) Resolve(policySet valid.PolicySet) (string, erro
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSourceResolver().")
|
||||
}
|
||||
params := []pegomock.Param{policySet}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Resolve", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{policySet}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Resolve", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockSourceResolver) VerifyWasCalledOnce() *VerifierMockSourceResolver {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockSourceResolver struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSourceResolver) Resolve(policySet valid.PolicySet) *MockSourceResolver_Resolve_OngoingVerification {
|
||||
params := []pegomock.Param{policySet}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Resolve", params, verifier.timeout)
|
||||
_params := []pegomock.Param{policySet}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Resolve", _params, verifier.timeout)
|
||||
return &MockSourceResolver_Resolve_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,11 +98,13 @@ func (c *MockSourceResolver_Resolve_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockSourceResolver_Resolve_OngoingVerification) GetAllCapturedArguments() (_param0 []valid.PolicySet) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]valid.PolicySet, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(valid.PolicySet)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]valid.PolicySet, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(valid.PolicySet)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -31,148 +31,148 @@ func (mock *MockWorkingDir) Clone(logger logging.SimpleLogging, headRepo models.
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 bool
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 bool
|
||||
var _ret2 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(bool)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(bool)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
if _result[2] != nil {
|
||||
_ret2 = _result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1, ret2
|
||||
return _ret0, _ret1, _ret2
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) Delete(logger logging.SimpleLogging, r models.Repo, p models.PullRequest) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Delete", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, r, p}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Delete", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) DeleteForWorkspace(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteForWorkspace", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteForWorkspace", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) DeletePlan(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string, path string, projectName string) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePlan", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePlan", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetGitUntrackedFiles(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) ([]string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetGitUntrackedFiles", params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]string)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetGitUntrackedFiles", _params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetPullDir(r models.Repo, p models.PullRequest) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{r, p}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullDir", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{r, p}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullDir", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetWorkingDir(r models.Repo, p models.PullRequest, workspace string) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{r, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetWorkingDir", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{r, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetWorkingDir", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) HasDiverged(logger logging.SimpleLogging, cloneDir string) bool {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, cloneDir}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("HasDiverged", params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var ret0 bool
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(bool)
|
||||
_params := []pegomock.Param{logger, cloneDir}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("HasDiverged", _params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var _ret0 bool
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(bool)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) SetCheckForUpstreamChanges() {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SetCheckForUpstreamChanges", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SetCheckForUpstreamChanges", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) VerifyWasCalledOnce() *VerifierMockWorkingDir {
|
||||
@@ -213,8 +213,8 @@ type VerifierMockWorkingDir struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) Clone(logger logging.SimpleLogging, headRepo models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_Clone_OngoingVerification {
|
||||
params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Clone", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Clone", _params, verifier.timeout)
|
||||
return &MockWorkingDir_Clone_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -229,31 +229,39 @@ func (c *MockWorkingDir_Clone_OngoingVerification) GetCapturedArguments() (loggi
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_Clone_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) Delete(logger logging.SimpleLogging, r models.Repo, p models.PullRequest) *MockWorkingDir_Delete_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Delete", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Delete", _params, verifier.timeout)
|
||||
return &MockWorkingDir_Delete_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -268,27 +276,33 @@ func (c *MockWorkingDir_Delete_OngoingVerification) GetCapturedArguments() (logg
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_Delete_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) DeleteForWorkspace(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_DeleteForWorkspace_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteForWorkspace", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteForWorkspace", _params, verifier.timeout)
|
||||
return &MockWorkingDir_DeleteForWorkspace_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -303,31 +317,39 @@ func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetCapturedArgum
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) DeletePlan(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string, path string, projectName string) *MockWorkingDir_DeletePlan_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePlan", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePlan", _params, verifier.timeout)
|
||||
return &MockWorkingDir_DeletePlan_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -342,39 +364,51 @@ func (c *MockWorkingDir_DeletePlan_OngoingVerification) GetCapturedArguments() (
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_DeletePlan_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string, _param4 []string, _param5 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(string)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) GetGitUntrackedFiles(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_GetGitUntrackedFiles_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetGitUntrackedFiles", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetGitUntrackedFiles", _params, verifier.timeout)
|
||||
return &MockWorkingDir_GetGitUntrackedFiles_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -389,31 +423,39 @@ func (c *MockWorkingDir_GetGitUntrackedFiles_OngoingVerification) GetCapturedArg
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_GetGitUntrackedFiles_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) GetPullDir(r models.Repo, p models.PullRequest) *MockWorkingDir_GetPullDir_OngoingVerification {
|
||||
params := []pegomock.Param{r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullDir", params, verifier.timeout)
|
||||
_params := []pegomock.Param{r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullDir", _params, verifier.timeout)
|
||||
return &MockWorkingDir_GetPullDir_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -428,23 +470,27 @@ func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetCapturedArguments() (
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) GetWorkingDir(r models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_GetWorkingDir_OngoingVerification {
|
||||
params := []pegomock.Param{r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetWorkingDir", params, verifier.timeout)
|
||||
_params := []pegomock.Param{r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetWorkingDir", _params, verifier.timeout)
|
||||
return &MockWorkingDir_GetWorkingDir_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -459,27 +505,33 @@ func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetCapturedArguments(
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) HasDiverged(logger logging.SimpleLogging, cloneDir string) *MockWorkingDir_HasDiverged_OngoingVerification {
|
||||
params := []pegomock.Param{logger, cloneDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "HasDiverged", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, cloneDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "HasDiverged", _params, verifier.timeout)
|
||||
return &MockWorkingDir_HasDiverged_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -494,23 +546,27 @@ func (c *MockWorkingDir_HasDiverged_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_HasDiverged_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) SetCheckForUpstreamChanges() *MockWorkingDir_SetCheckForUpstreamChanges_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetCheckForUpstreamChanges", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetCheckForUpstreamChanges", _params, verifier.timeout)
|
||||
return &MockWorkingDir_SetCheckForUpstreamChanges_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,19 +31,19 @@ func (mock *MockAzureDevopsPullGetter) GetPullRequest(logger logging.SimpleLoggi
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockAzureDevopsPullGetter().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repo, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullRequest", params, []reflect.Type{reflect.TypeOf((**azuredevops.GitPullRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *azuredevops.GitPullRequest
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*azuredevops.GitPullRequest)
|
||||
_params := []pegomock.Param{logger, repo, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullRequest", _params, []reflect.Type{reflect.TypeOf((**azuredevops.GitPullRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *azuredevops.GitPullRequest
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*azuredevops.GitPullRequest)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockAzureDevopsPullGetter) VerifyWasCalledOnce() *VerifierMockAzureDevopsPullGetter {
|
||||
@@ -84,8 +84,8 @@ type VerifierMockAzureDevopsPullGetter struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockAzureDevopsPullGetter) GetPullRequest(logger logging.SimpleLogging, repo models.Repo, pullNum int) *MockAzureDevopsPullGetter_GetPullRequest_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repo, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullRequest", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repo, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullRequest", _params, verifier.timeout)
|
||||
return &MockAzureDevopsPullGetter_GetPullRequest_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -100,19 +100,25 @@ func (c *MockAzureDevopsPullGetter_GetPullRequest_OngoingVerification) GetCaptur
|
||||
}
|
||||
|
||||
func (c *MockAzureDevopsPullGetter_GetPullRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(int)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,76 +29,76 @@ func (mock *MockCommandRequirementHandler) ValidateApplyProject(repoDir string,
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommandRequirementHandler().")
|
||||
}
|
||||
params := []pegomock.Param{repoDir, ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("ValidateApplyProject", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{repoDir, ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("ValidateApplyProject", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockCommandRequirementHandler) ValidateImportProject(repoDir string, ctx command.ProjectContext) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommandRequirementHandler().")
|
||||
}
|
||||
params := []pegomock.Param{repoDir, ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("ValidateImportProject", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{repoDir, ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("ValidateImportProject", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockCommandRequirementHandler) ValidatePlanProject(repoDir string, ctx command.ProjectContext) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommandRequirementHandler().")
|
||||
}
|
||||
params := []pegomock.Param{repoDir, ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("ValidatePlanProject", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{repoDir, ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("ValidatePlanProject", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockCommandRequirementHandler) ValidateProjectDependencies(ctx command.ProjectContext) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommandRequirementHandler().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("ValidateProjectDependencies", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("ValidateProjectDependencies", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockCommandRequirementHandler) VerifyWasCalledOnce() *VerifierMockCommandRequirementHandler {
|
||||
@@ -139,8 +139,8 @@ type VerifierMockCommandRequirementHandler struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommandRequirementHandler) ValidateApplyProject(repoDir string, ctx command.ProjectContext) *MockCommandRequirementHandler_ValidateApplyProject_OngoingVerification {
|
||||
params := []pegomock.Param{repoDir, ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidateApplyProject", params, verifier.timeout)
|
||||
_params := []pegomock.Param{repoDir, ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidateApplyProject", _params, verifier.timeout)
|
||||
return &MockCommandRequirementHandler_ValidateApplyProject_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -155,23 +155,27 @@ func (c *MockCommandRequirementHandler_ValidateApplyProject_OngoingVerification)
|
||||
}
|
||||
|
||||
func (c *MockCommandRequirementHandler_ValidateApplyProject_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(command.ProjectContext)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommandRequirementHandler) ValidateImportProject(repoDir string, ctx command.ProjectContext) *MockCommandRequirementHandler_ValidateImportProject_OngoingVerification {
|
||||
params := []pegomock.Param{repoDir, ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidateImportProject", params, verifier.timeout)
|
||||
_params := []pegomock.Param{repoDir, ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidateImportProject", _params, verifier.timeout)
|
||||
return &MockCommandRequirementHandler_ValidateImportProject_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -186,23 +190,27 @@ func (c *MockCommandRequirementHandler_ValidateImportProject_OngoingVerification
|
||||
}
|
||||
|
||||
func (c *MockCommandRequirementHandler_ValidateImportProject_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(command.ProjectContext)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommandRequirementHandler) ValidatePlanProject(repoDir string, ctx command.ProjectContext) *MockCommandRequirementHandler_ValidatePlanProject_OngoingVerification {
|
||||
params := []pegomock.Param{repoDir, ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidatePlanProject", params, verifier.timeout)
|
||||
_params := []pegomock.Param{repoDir, ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidatePlanProject", _params, verifier.timeout)
|
||||
return &MockCommandRequirementHandler_ValidatePlanProject_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -217,23 +225,27 @@ func (c *MockCommandRequirementHandler_ValidatePlanProject_OngoingVerification)
|
||||
}
|
||||
|
||||
func (c *MockCommandRequirementHandler_ValidatePlanProject_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(command.ProjectContext)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommandRequirementHandler) ValidateProjectDependencies(ctx command.ProjectContext) *MockCommandRequirementHandler_ValidateProjectDependencies_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidateProjectDependencies", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidateProjectDependencies", _params, verifier.timeout)
|
||||
return &MockCommandRequirementHandler_ValidateProjectDependencies_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -248,11 +260,13 @@ func (c *MockCommandRequirementHandler_ValidateProjectDependencies_OngoingVerifi
|
||||
}
|
||||
|
||||
func (c *MockCommandRequirementHandler_ValidateProjectDependencies_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,16 +30,16 @@ func (mock *MockCommandRunner) RunAutoplanCommand(baseRepo models.Repo, headRepo
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{baseRepo, headRepo, pull, user}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("RunAutoplanCommand", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{baseRepo, headRepo, pull, user}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("RunAutoplanCommand", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockCommandRunner) RunCommentCommand(baseRepo models.Repo, maybeHeadRepo *models.Repo, maybePull *models.PullRequest, user models.User, pullNum int, cmd *events.CommentCommand) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{baseRepo, maybeHeadRepo, maybePull, user, pullNum, cmd}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("RunCommentCommand", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{baseRepo, maybeHeadRepo, maybePull, user, pullNum, cmd}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("RunCommentCommand", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockCommandRunner) VerifyWasCalledOnce() *VerifierMockCommandRunner {
|
||||
@@ -80,8 +80,8 @@ type VerifierMockCommandRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommandRunner) RunAutoplanCommand(baseRepo models.Repo, headRepo models.Repo, pull models.PullRequest, user models.User) *MockCommandRunner_RunAutoplanCommand_OngoingVerification {
|
||||
params := []pegomock.Param{baseRepo, headRepo, pull, user}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunAutoplanCommand", params, verifier.timeout)
|
||||
_params := []pegomock.Param{baseRepo, headRepo, pull, user}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunAutoplanCommand", _params, verifier.timeout)
|
||||
return &MockCommandRunner_RunAutoplanCommand_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -96,31 +96,39 @@ func (c *MockCommandRunner_RunAutoplanCommand_OngoingVerification) GetCapturedAr
|
||||
}
|
||||
|
||||
func (c *MockCommandRunner_RunAutoplanCommand_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []models.User) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommandRunner) RunCommentCommand(baseRepo models.Repo, maybeHeadRepo *models.Repo, maybePull *models.PullRequest, user models.User, pullNum int, cmd *events.CommentCommand) *MockCommandRunner_RunCommentCommand_OngoingVerification {
|
||||
params := []pegomock.Param{baseRepo, maybeHeadRepo, maybePull, user, pullNum, cmd}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunCommentCommand", params, verifier.timeout)
|
||||
_params := []pegomock.Param{baseRepo, maybeHeadRepo, maybePull, user, pullNum, cmd}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunCommentCommand", _params, verifier.timeout)
|
||||
return &MockCommandRunner_RunCommentCommand_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -135,31 +143,43 @@ func (c *MockCommandRunner_RunCommentCommand_OngoingVerification) GetCapturedArg
|
||||
}
|
||||
|
||||
func (c *MockCommandRunner_RunCommentCommand_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []*models.Repo, _param2 []*models.PullRequest, _param3 []models.User, _param4 []int, _param5 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]*models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(*models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]*models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(*models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
}
|
||||
}
|
||||
_param4 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(int)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(int)
|
||||
}
|
||||
}
|
||||
_param5 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -24,11 +24,11 @@ func NewMockCommentBuilder(options ...pegomock.Option) *MockCommentBuilder {
|
||||
func (mock *MockCommentBuilder) SetFailHandler(fh pegomock.FailHandler) { mock.fail = fh }
|
||||
func (mock *MockCommentBuilder) FailHandler() pegomock.FailHandler { return mock.fail }
|
||||
|
||||
func (mock *MockCommentBuilder) BuildApplyComment(repoRelDir string, workspace string, project string, autoMergeDisabled bool, mergeMethod string) string {
|
||||
func (mock *MockCommentBuilder) BuildApplyComment(repoRelDir string, workspace string, project string, autoMergeDisabled bool, autoMergeMethod string) string {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommentBuilder().")
|
||||
}
|
||||
_params := []pegomock.Param{repoRelDir, workspace, project, autoMergeDisabled, mergeMethod}
|
||||
_params := []pegomock.Param{repoRelDir, workspace, project, autoMergeDisabled, autoMergeMethod}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildApplyComment", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
if len(_result) != 0 {
|
||||
@@ -106,8 +106,8 @@ type VerifierMockCommentBuilder struct {
|
||||
timeout time.Duration
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommentBuilder) BuildApplyComment(repoRelDir string, workspace string, project string, autoMergeDisabled bool, mergeMethod string) *MockCommentBuilder_BuildApplyComment_OngoingVerification {
|
||||
_params := []pegomock.Param{repoRelDir, workspace, project, autoMergeDisabled, mergeMethod}
|
||||
func (verifier *VerifierMockCommentBuilder) BuildApplyComment(repoRelDir string, workspace string, project string, autoMergeDisabled bool, autoMergeMethod string) *MockCommentBuilder_BuildApplyComment_OngoingVerification {
|
||||
_params := []pegomock.Param{repoRelDir, workspace, project, autoMergeDisabled, autoMergeMethod}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildApplyComment", _params, verifier.timeout)
|
||||
return &MockCommentBuilder_BuildApplyComment_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
@@ -118,8 +118,8 @@ type MockCommentBuilder_BuildApplyComment_OngoingVerification struct {
|
||||
}
|
||||
|
||||
func (c *MockCommentBuilder_BuildApplyComment_OngoingVerification) GetCapturedArguments() (string, string, string, bool, string) {
|
||||
repoRelDir, workspace, project, autoMergeDisabled, mergeMethod := c.GetAllCapturedArguments()
|
||||
return repoRelDir[len(repoRelDir)-1], workspace[len(workspace)-1], project[len(project)-1], autoMergeDisabled[len(autoMergeDisabled)-1], mergeMethod[len(mergeMethod)-1]
|
||||
repoRelDir, workspace, project, autoMergeDisabled, autoMergeMethod := c.GetAllCapturedArguments()
|
||||
return repoRelDir[len(repoRelDir)-1], workspace[len(workspace)-1], project[len(project)-1], autoMergeDisabled[len(autoMergeDisabled)-1], autoMergeMethod[len(autoMergeMethod)-1]
|
||||
}
|
||||
|
||||
func (c *MockCommentBuilder_BuildApplyComment_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []string, _param2 []string, _param3 []bool, _param4 []string) {
|
||||
|
||||
@@ -30,15 +30,15 @@ func (mock *MockCommentParsing) Parse(comment string, vcsHost models.VCSHostType
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommentParsing().")
|
||||
}
|
||||
params := []pegomock.Param{comment, vcsHost}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Parse", params, []reflect.Type{reflect.TypeOf((*events.CommentParseResult)(nil)).Elem()})
|
||||
var ret0 events.CommentParseResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(events.CommentParseResult)
|
||||
_params := []pegomock.Param{comment, vcsHost}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Parse", _params, []reflect.Type{reflect.TypeOf((*events.CommentParseResult)(nil)).Elem()})
|
||||
var _ret0 events.CommentParseResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(events.CommentParseResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockCommentParsing) VerifyWasCalledOnce() *VerifierMockCommentParsing {
|
||||
@@ -79,8 +79,8 @@ type VerifierMockCommentParsing struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommentParsing) Parse(comment string, vcsHost models.VCSHostType) *MockCommentParsing_Parse_OngoingVerification {
|
||||
params := []pegomock.Param{comment, vcsHost}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Parse", params, verifier.timeout)
|
||||
_params := []pegomock.Param{comment, vcsHost}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Parse", _params, verifier.timeout)
|
||||
return &MockCommentParsing_Parse_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -95,15 +95,19 @@ func (c *MockCommentParsing_Parse_OngoingVerification) GetCapturedArguments() (s
|
||||
}
|
||||
|
||||
func (c *MockCommentParsing_Parse_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []models.VCSHostType) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.VCSHostType, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.VCSHostType)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.VCSHostType, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.VCSHostType)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -31,60 +31,60 @@ func (mock *MockCommitStatusUpdater) UpdateCombined(logger logging.SimpleLogging
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommitStatusUpdater().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repo, pull, status, cmdName}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateCombined", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, repo, pull, status, cmdName}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateCombined", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockCommitStatusUpdater) UpdateCombinedCount(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, status models.CommitStatus, cmdName command.Name, numSuccess int, numTotal int) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommitStatusUpdater().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repo, pull, status, cmdName, numSuccess, numTotal}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateCombinedCount", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, repo, pull, status, cmdName, numSuccess, numTotal}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateCombinedCount", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockCommitStatusUpdater) UpdatePostWorkflowHook(logger logging.SimpleLogging, pull models.PullRequest, status models.CommitStatus, hookDescription string, runtimeDescription string, url string) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommitStatusUpdater().")
|
||||
}
|
||||
params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdatePostWorkflowHook", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdatePostWorkflowHook", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockCommitStatusUpdater) UpdatePreWorkflowHook(logger logging.SimpleLogging, pull models.PullRequest, status models.CommitStatus, hookDescription string, runtimeDescription string, url string) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCommitStatusUpdater().")
|
||||
}
|
||||
params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdatePreWorkflowHook", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdatePreWorkflowHook", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockCommitStatusUpdater) VerifyWasCalledOnce() *VerifierMockCommitStatusUpdater {
|
||||
@@ -125,8 +125,8 @@ type VerifierMockCommitStatusUpdater struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommitStatusUpdater) UpdateCombined(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, status models.CommitStatus, cmdName command.Name) *MockCommitStatusUpdater_UpdateCombined_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repo, pull, status, cmdName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateCombined", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repo, pull, status, cmdName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateCombined", _params, verifier.timeout)
|
||||
return &MockCommitStatusUpdater_UpdateCombined_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -141,35 +141,45 @@ func (c *MockCommitStatusUpdater_UpdateCombined_OngoingVerification) GetCaptured
|
||||
}
|
||||
|
||||
func (c *MockCommitStatusUpdater_UpdateCombined_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []models.CommitStatus, _param4 []command.Name) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.CommitStatus)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(models.CommitStatus)
|
||||
}
|
||||
}
|
||||
_param4 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(command.Name)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommitStatusUpdater) UpdateCombinedCount(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest, status models.CommitStatus, cmdName command.Name, numSuccess int, numTotal int) *MockCommitStatusUpdater_UpdateCombinedCount_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repo, pull, status, cmdName, numSuccess, numTotal}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateCombinedCount", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repo, pull, status, cmdName, numSuccess, numTotal}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateCombinedCount", _params, verifier.timeout)
|
||||
return &MockCommitStatusUpdater_UpdateCombinedCount_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -184,43 +194,57 @@ func (c *MockCommitStatusUpdater_UpdateCombinedCount_OngoingVerification) GetCap
|
||||
}
|
||||
|
||||
func (c *MockCommitStatusUpdater_UpdateCombinedCount_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []models.CommitStatus, _param4 []command.Name, _param5 []int, _param6 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.CommitStatus)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(models.CommitStatus)
|
||||
}
|
||||
}
|
||||
_param4 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(command.Name)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
_param5 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(int)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(int)
|
||||
}
|
||||
}
|
||||
_param6 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[6] {
|
||||
_param6[u] = param.(int)
|
||||
if len(_params) > 6 {
|
||||
_param6 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[6] {
|
||||
_param6[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommitStatusUpdater) UpdatePostWorkflowHook(logger logging.SimpleLogging, pull models.PullRequest, status models.CommitStatus, hookDescription string, runtimeDescription string, url string) *MockCommitStatusUpdater_UpdatePostWorkflowHook_OngoingVerification {
|
||||
params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdatePostWorkflowHook", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdatePostWorkflowHook", _params, verifier.timeout)
|
||||
return &MockCommitStatusUpdater_UpdatePostWorkflowHook_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -235,39 +259,51 @@ func (c *MockCommitStatusUpdater_UpdatePostWorkflowHook_OngoingVerification) Get
|
||||
}
|
||||
|
||||
func (c *MockCommitStatusUpdater_UpdatePostWorkflowHook_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.PullRequest, _param2 []models.CommitStatus, _param3 []string, _param4 []string, _param5 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(string)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCommitStatusUpdater) UpdatePreWorkflowHook(logger logging.SimpleLogging, pull models.PullRequest, status models.CommitStatus, hookDescription string, runtimeDescription string, url string) *MockCommitStatusUpdater_UpdatePreWorkflowHook_OngoingVerification {
|
||||
params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdatePreWorkflowHook", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, pull, status, hookDescription, runtimeDescription, url}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdatePreWorkflowHook", _params, verifier.timeout)
|
||||
return &MockCommitStatusUpdater_UpdatePreWorkflowHook_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -282,31 +318,43 @@ func (c *MockCommitStatusUpdater_UpdatePreWorkflowHook_OngoingVerification) GetC
|
||||
}
|
||||
|
||||
func (c *MockCommitStatusUpdater_UpdatePreWorkflowHook_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.PullRequest, _param2 []models.CommitStatus, _param3 []string, _param4 []string, _param5 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(string)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,19 +30,19 @@ func (mock *MockCustomStepRunner) Run(ctx command.ProjectContext, shell *valid.C
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockCustomStepRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, cmd, path, envs, streamOutput, postProcessOutput}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx, shell, cmd, path, envs, streamOutput, postProcessOutput}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockCustomStepRunner) VerifyWasCalledOnce() *VerifierMockCustomStepRunner {
|
||||
@@ -83,8 +83,8 @@ type VerifierMockCustomStepRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockCustomStepRunner) Run(ctx command.ProjectContext, shell *valid.CommandShell, cmd string, path string, envs map[string]string, streamOutput bool, postProcessOutput valid.PostProcessRunOutputOption) *MockCustomStepRunner_Run_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, cmd, path, envs, streamOutput, postProcessOutput}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, shell, cmd, path, envs, streamOutput, postProcessOutput}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockCustomStepRunner_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -93,37 +93,55 @@ type MockCustomStepRunner_Run_OngoingVerification struct {
|
||||
methodInvocations []pegomock.MethodInvocation
|
||||
}
|
||||
|
||||
func (c *MockCustomStepRunner_Run_OngoingVerification) GetCapturedArguments() (command.ProjectContext, string, string, map[string]string, bool, valid.PostProcessRunOutputOption) {
|
||||
ctx, cmd, path, envs, streamOutput, postProcessOutput := c.GetAllCapturedArguments()
|
||||
return ctx[len(ctx)-1], cmd[len(cmd)-1], path[len(path)-1], envs[len(envs)-1], streamOutput[len(streamOutput)-1], postProcessOutput[len(postProcessOutput)-1]
|
||||
func (c *MockCustomStepRunner_Run_OngoingVerification) GetCapturedArguments() (command.ProjectContext, *valid.CommandShell, string, string, map[string]string, bool, valid.PostProcessRunOutputOption) {
|
||||
ctx, shell, cmd, path, envs, streamOutput, postProcessOutput := c.GetAllCapturedArguments()
|
||||
return ctx[len(ctx)-1], shell[len(shell)-1], cmd[len(cmd)-1], path[len(path)-1], envs[len(envs)-1], streamOutput[len(streamOutput)-1], postProcessOutput[len(postProcessOutput)-1]
|
||||
}
|
||||
|
||||
func (c *MockCustomStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []string, _param2 []string, _param3 []map[string]string, _param4 []bool, _param5 []valid.PostProcessRunOutputOption) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
func (c *MockCustomStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []*valid.CommandShell, _param2 []string, _param3 []string, _param4 []map[string]string, _param5 []bool, _param6 []valid.PostProcessRunOutputOption) {
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*valid.CommandShell, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*valid.CommandShell)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(bool)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(map[string]string)
|
||||
}
|
||||
}
|
||||
_param5 = make([]valid.PostProcessRunOutputOption, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(valid.PostProcessRunOutputOption)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(bool)
|
||||
}
|
||||
}
|
||||
if len(_params) > 6 {
|
||||
_param6 = make([]valid.PostProcessRunOutputOption, len(c.methodInvocations))
|
||||
for u, param := range _params[6] {
|
||||
_param6[u] = param.(valid.PostProcessRunOutputOption)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,38 +30,38 @@ func (mock *MockDeleteLockCommand) DeleteLock(logger logging.SimpleLogging, id s
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockDeleteLockCommand().")
|
||||
}
|
||||
params := []pegomock.Param{logger, id}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteLock", params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *models.ProjectLock
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*models.ProjectLock)
|
||||
_params := []pegomock.Param{logger, id}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteLock", _params, []reflect.Type{reflect.TypeOf((**models.ProjectLock)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *models.ProjectLock
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*models.ProjectLock)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockDeleteLockCommand) DeleteLocksByPull(logger logging.SimpleLogging, repoFullName string, pullNum int) (int, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockDeleteLockCommand().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteLocksByPull", params, []reflect.Type{reflect.TypeOf((*int)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 int
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(int)
|
||||
_params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteLocksByPull", _params, []reflect.Type{reflect.TypeOf((*int)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 int
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(int)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockDeleteLockCommand) VerifyWasCalledOnce() *VerifierMockDeleteLockCommand {
|
||||
@@ -102,8 +102,8 @@ type VerifierMockDeleteLockCommand struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockDeleteLockCommand) DeleteLock(logger logging.SimpleLogging, id string) *MockDeleteLockCommand_DeleteLock_OngoingVerification {
|
||||
params := []pegomock.Param{logger, id}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, id}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteLock", _params, verifier.timeout)
|
||||
return &MockDeleteLockCommand_DeleteLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -118,23 +118,27 @@ func (c *MockDeleteLockCommand_DeleteLock_OngoingVerification) GetCapturedArgume
|
||||
}
|
||||
|
||||
func (c *MockDeleteLockCommand_DeleteLock_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockDeleteLockCommand) DeleteLocksByPull(logger logging.SimpleLogging, repoFullName string, pullNum int) *MockDeleteLockCommand_DeleteLocksByPull_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteLocksByPull", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteLocksByPull", _params, verifier.timeout)
|
||||
return &MockDeleteLockCommand_DeleteLocksByPull_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -149,19 +153,25 @@ func (c *MockDeleteLockCommand_DeleteLocksByPull_OngoingVerification) GetCapture
|
||||
}
|
||||
|
||||
func (c *MockDeleteLockCommand_DeleteLocksByPull_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []string, _param2 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(int)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
pegomock "github.com/petergtz/pegomock/v4"
|
||||
valid "github.com/runatlantis/atlantis/server/core/config/valid"
|
||||
command "github.com/runatlantis/atlantis/server/events/command"
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
pegomock "github.com/petergtz/pegomock/v4"
|
||||
"github.com/runatlantis/atlantis/server/core/config/valid"
|
||||
command "github.com/runatlantis/atlantis/server/events/command"
|
||||
)
|
||||
|
||||
type MockEnvStepRunner struct {
|
||||
@@ -31,19 +30,19 @@ func (mock *MockEnvStepRunner) Run(ctx command.ProjectContext, shell *valid.Comm
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockEnvStepRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, cmd, value, path, envs}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx, shell, cmd, value, path, envs}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockEnvStepRunner) VerifyWasCalledOnce() *VerifierMockEnvStepRunner {
|
||||
@@ -84,8 +83,8 @@ type VerifierMockEnvStepRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockEnvStepRunner) Run(ctx command.ProjectContext, shell *valid.CommandShell, cmd string, value string, path string, envs map[string]string) *MockEnvStepRunner_Run_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, cmd, value, path, envs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, shell, cmd, value, path, envs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockEnvStepRunner_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -94,33 +93,49 @@ type MockEnvStepRunner_Run_OngoingVerification struct {
|
||||
methodInvocations []pegomock.MethodInvocation
|
||||
}
|
||||
|
||||
func (c *MockEnvStepRunner_Run_OngoingVerification) GetCapturedArguments() (command.ProjectContext, string, string, string, map[string]string) {
|
||||
ctx, cmd, value, path, envs := c.GetAllCapturedArguments()
|
||||
return ctx[len(ctx)-1], cmd[len(cmd)-1], value[len(value)-1], path[len(path)-1], envs[len(envs)-1]
|
||||
func (c *MockEnvStepRunner_Run_OngoingVerification) GetCapturedArguments() (command.ProjectContext, *valid.CommandShell, string, string, string, map[string]string) {
|
||||
ctx, shell, cmd, value, path, envs := c.GetAllCapturedArguments()
|
||||
return ctx[len(ctx)-1], shell[len(shell)-1], cmd[len(cmd)-1], value[len(value)-1], path[len(path)-1], envs[len(envs)-1]
|
||||
}
|
||||
|
||||
func (c *MockEnvStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []string, _param2 []string, _param3 []string, _param4 []map[string]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
func (c *MockEnvStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []*valid.CommandShell, _param2 []string, _param3 []string, _param4 []string, _param5 []map[string]string) {
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*valid.CommandShell, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*valid.CommandShell)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(map[string]string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
}
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(map[string]string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,19 +31,19 @@ func (mock *MockGithubPullGetter) GetPullRequest(logger logging.SimpleLogging, r
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGithubPullGetter().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repo, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullRequest", params, []reflect.Type{reflect.TypeOf((**github.PullRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *github.PullRequest
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*github.PullRequest)
|
||||
_params := []pegomock.Param{logger, repo, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullRequest", _params, []reflect.Type{reflect.TypeOf((**github.PullRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *github.PullRequest
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*github.PullRequest)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGithubPullGetter) VerifyWasCalledOnce() *VerifierMockGithubPullGetter {
|
||||
@@ -84,8 +84,8 @@ type VerifierMockGithubPullGetter struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGithubPullGetter) GetPullRequest(logger logging.SimpleLogging, repo models.Repo, pullNum int) *MockGithubPullGetter_GetPullRequest_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repo, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullRequest", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repo, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullRequest", _params, verifier.timeout)
|
||||
return &MockGithubPullGetter_GetPullRequest_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -100,19 +100,25 @@ func (c *MockGithubPullGetter_GetPullRequest_OngoingVerification) GetCapturedArg
|
||||
}
|
||||
|
||||
func (c *MockGithubPullGetter_GetPullRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(int)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,19 +30,19 @@ func (mock *MockGitlabMergeRequestGetter) GetMergeRequest(logger logging.SimpleL
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGitlabMergeRequestGetter().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetMergeRequest", params, []reflect.Type{reflect.TypeOf((**go_gitlab.MergeRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *go_gitlab.MergeRequest
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*go_gitlab.MergeRequest)
|
||||
_params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetMergeRequest", _params, []reflect.Type{reflect.TypeOf((**go_gitlab.MergeRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *go_gitlab.MergeRequest
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*go_gitlab.MergeRequest)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGitlabMergeRequestGetter) VerifyWasCalledOnce() *VerifierMockGitlabMergeRequestGetter {
|
||||
@@ -83,8 +83,8 @@ type VerifierMockGitlabMergeRequestGetter struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGitlabMergeRequestGetter) GetMergeRequest(logger logging.SimpleLogging, repoFullName string, pullNum int) *MockGitlabMergeRequestGetter_GetMergeRequest_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetMergeRequest", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetMergeRequest", _params, verifier.timeout)
|
||||
return &MockGitlabMergeRequestGetter_GetMergeRequest_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -99,19 +99,25 @@ func (c *MockGitlabMergeRequestGetter_GetMergeRequest_OngoingVerification) GetCa
|
||||
}
|
||||
|
||||
func (c *MockGitlabMergeRequestGetter_GetMergeRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []string, _param2 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(int)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,8 +29,8 @@ func (mock *MockJobMessageSender) Send(ctx command.ProjectContext, msg string, o
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockJobMessageSender().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Send", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Send", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockJobMessageSender) VerifyWasCalledOnce() *VerifierMockJobMessageSender {
|
||||
@@ -71,8 +71,8 @@ type VerifierMockJobMessageSender struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockJobMessageSender) Send(ctx command.ProjectContext, msg string, operationComplete bool) *MockJobMessageSender_Send_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", _params, verifier.timeout)
|
||||
return &MockJobMessageSender_Send_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -87,19 +87,25 @@ func (c *MockJobMessageSender_Send_OngoingVerification) GetCapturedArguments() (
|
||||
}
|
||||
|
||||
func (c *MockJobMessageSender_Send_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []string, _param2 []bool) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(bool)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(bool)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,15 +30,15 @@ func (mock *MockJobURLSetter) SetJobURLWithStatus(ctx command.ProjectContext, cm
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockJobURLSetter().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, cmdName, status, res}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("SetJobURLWithStatus", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{ctx, cmdName, status, res}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("SetJobURLWithStatus", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockJobURLSetter) VerifyWasCalledOnce() *VerifierMockJobURLSetter {
|
||||
@@ -79,8 +79,8 @@ type VerifierMockJobURLSetter struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockJobURLSetter) SetJobURLWithStatus(ctx command.ProjectContext, cmdName command.Name, status models.CommitStatus, res *command.ProjectResult) *MockJobURLSetter_SetJobURLWithStatus_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, cmdName, status, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetJobURLWithStatus", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, cmdName, status, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetJobURLWithStatus", _params, verifier.timeout)
|
||||
return &MockJobURLSetter_SetJobURLWithStatus_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -95,23 +95,31 @@ func (c *MockJobURLSetter_SetJobURLWithStatus_OngoingVerification) GetCapturedAr
|
||||
}
|
||||
|
||||
func (c *MockJobURLSetter_SetJobURLWithStatus_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []command.Name, _param2 []models.CommitStatus, _param3 []*command.ProjectResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(command.Name)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
}
|
||||
_param3 = make([]*command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(*command.ProjectResult)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]*command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(*command.ProjectResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -28,15 +28,15 @@ func (mock *MockLockURLGenerator) GenerateLockURL(lockID string) string {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockLockURLGenerator().")
|
||||
}
|
||||
params := []pegomock.Param{lockID}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateLockURL", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem()})
|
||||
var ret0 string
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{lockID}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateLockURL", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockLockURLGenerator) VerifyWasCalledOnce() *VerifierMockLockURLGenerator {
|
||||
@@ -77,8 +77,8 @@ type VerifierMockLockURLGenerator struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockLockURLGenerator) GenerateLockURL(lockID string) *MockLockURLGenerator_GenerateLockURL_OngoingVerification {
|
||||
params := []pegomock.Param{lockID}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateLockURL", params, verifier.timeout)
|
||||
_params := []pegomock.Param{lockID}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateLockURL", _params, verifier.timeout)
|
||||
return &MockLockURLGenerator_GenerateLockURL_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -93,11 +93,13 @@ func (c *MockLockURLGenerator_GenerateLockURL_OngoingVerification) GetCapturedAr
|
||||
}
|
||||
|
||||
func (c *MockLockURLGenerator_GenerateLockURL_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,34 +29,34 @@ func (mock *MockPendingPlanFinder) DeletePlans(pullDir string) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPendingPlanFinder().")
|
||||
}
|
||||
params := []pegomock.Param{pullDir}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePlans", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{pullDir}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePlans", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockPendingPlanFinder) Find(pullDir string) ([]events.PendingPlan, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPendingPlanFinder().")
|
||||
}
|
||||
params := []pegomock.Param{pullDir}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Find", params, []reflect.Type{reflect.TypeOf((*[]events.PendingPlan)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []events.PendingPlan
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]events.PendingPlan)
|
||||
_params := []pegomock.Param{pullDir}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Find", _params, []reflect.Type{reflect.TypeOf((*[]events.PendingPlan)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []events.PendingPlan
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]events.PendingPlan)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockPendingPlanFinder) VerifyWasCalledOnce() *VerifierMockPendingPlanFinder {
|
||||
@@ -97,8 +97,8 @@ type VerifierMockPendingPlanFinder struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPendingPlanFinder) DeletePlans(pullDir string) *MockPendingPlanFinder_DeletePlans_OngoingVerification {
|
||||
params := []pegomock.Param{pullDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePlans", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pullDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePlans", _params, verifier.timeout)
|
||||
return &MockPendingPlanFinder_DeletePlans_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -113,19 +113,21 @@ func (c *MockPendingPlanFinder_DeletePlans_OngoingVerification) GetCapturedArgum
|
||||
}
|
||||
|
||||
func (c *MockPendingPlanFinder_DeletePlans_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPendingPlanFinder) Find(pullDir string) *MockPendingPlanFinder_Find_OngoingVerification {
|
||||
params := []pegomock.Param{pullDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Find", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pullDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Find", _params, verifier.timeout)
|
||||
return &MockPendingPlanFinder_Find_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -140,11 +142,13 @@ func (c *MockPendingPlanFinder_Find_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockPendingPlanFinder_Find_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -28,19 +28,19 @@ func (mock *MockPostWorkflowHookURLGenerator) GenerateProjectWorkflowHookURL(hoo
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPostWorkflowHookURLGenerator().")
|
||||
}
|
||||
params := []pegomock.Param{hookID}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateProjectWorkflowHookURL", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{hookID}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateProjectWorkflowHookURL", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockPostWorkflowHookURLGenerator) VerifyWasCalledOnce() *VerifierMockPostWorkflowHookURLGenerator {
|
||||
@@ -81,8 +81,8 @@ type VerifierMockPostWorkflowHookURLGenerator struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPostWorkflowHookURLGenerator) GenerateProjectWorkflowHookURL(hookID string) *MockPostWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_OngoingVerification {
|
||||
params := []pegomock.Param{hookID}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateProjectWorkflowHookURL", params, verifier.timeout)
|
||||
_params := []pegomock.Param{hookID}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateProjectWorkflowHookURL", _params, verifier.timeout)
|
||||
return &MockPostWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -97,11 +97,13 @@ func (c *MockPostWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_Ongoing
|
||||
}
|
||||
|
||||
func (c *MockPostWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -32,15 +32,15 @@ func (mock *MockPostWorkflowHooksCommandRunner) RunPostHooks(ctx *command.Contex
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPostWorkflowHooksCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, cmd}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("RunPostHooks", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{ctx, cmd}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("RunPostHooks", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockPostWorkflowHooksCommandRunner) VerifyWasCalledOnce() *VerifierMockPostWorkflowHooksCommandRunner {
|
||||
@@ -81,8 +81,8 @@ type VerifierMockPostWorkflowHooksCommandRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPostWorkflowHooksCommandRunner) RunPostHooks(ctx *command.Context, cmd *events.CommentCommand) *MockPostWorkflowHooksCommandRunner_RunPostHooks_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, cmd}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunPostHooks", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, cmd}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunPostHooks", _params, verifier.timeout)
|
||||
return &MockPostWorkflowHooksCommandRunner_RunPostHooks_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -97,15 +97,19 @@ func (c *MockPostWorkflowHooksCommandRunner_RunPostHooks_OngoingVerification) Ge
|
||||
}
|
||||
|
||||
func (c *MockPostWorkflowHooksCommandRunner_RunPostHooks_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -28,19 +28,19 @@ func (mock *MockPreWorkflowHookURLGenerator) GenerateProjectWorkflowHookURL(hook
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPreWorkflowHookURLGenerator().")
|
||||
}
|
||||
params := []pegomock.Param{hookID}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateProjectWorkflowHookURL", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{hookID}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateProjectWorkflowHookURL", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockPreWorkflowHookURLGenerator) VerifyWasCalledOnce() *VerifierMockPreWorkflowHookURLGenerator {
|
||||
@@ -81,8 +81,8 @@ type VerifierMockPreWorkflowHookURLGenerator struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPreWorkflowHookURLGenerator) GenerateProjectWorkflowHookURL(hookID string) *MockPreWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_OngoingVerification {
|
||||
params := []pegomock.Param{hookID}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateProjectWorkflowHookURL", params, verifier.timeout)
|
||||
_params := []pegomock.Param{hookID}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateProjectWorkflowHookURL", _params, verifier.timeout)
|
||||
return &MockPreWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -97,11 +97,13 @@ func (c *MockPreWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_OngoingV
|
||||
}
|
||||
|
||||
func (c *MockPreWorkflowHookURLGenerator_GenerateProjectWorkflowHookURL_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -32,15 +32,15 @@ func (mock *MockPreWorkflowHooksCommandRunner) RunPreHooks(ctx *command.Context,
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPreWorkflowHooksCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, cmd}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("RunPreHooks", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{ctx, cmd}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("RunPreHooks", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockPreWorkflowHooksCommandRunner) VerifyWasCalledOnce() *VerifierMockPreWorkflowHooksCommandRunner {
|
||||
@@ -81,8 +81,8 @@ type VerifierMockPreWorkflowHooksCommandRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPreWorkflowHooksCommandRunner) RunPreHooks(ctx *command.Context, cmd *events.CommentCommand) *MockPreWorkflowHooksCommandRunner_RunPreHooks_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, cmd}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunPreHooks", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, cmd}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "RunPreHooks", _params, verifier.timeout)
|
||||
return &MockPreWorkflowHooksCommandRunner_RunPreHooks_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -97,15 +97,19 @@ func (c *MockPreWorkflowHooksCommandRunner_RunPreHooks_OngoingVerification) GetC
|
||||
}
|
||||
|
||||
func (c *MockPreWorkflowHooksCommandRunner_RunPreHooks_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,133 +30,133 @@ func (mock *MockProjectCommandBuilder) BuildApplyCommands(ctx *command.Context,
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandBuilder().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("BuildApplyCommands", params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []command.ProjectContext
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]command.ProjectContext)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildApplyCommands", _params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []command.ProjectContext
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]command.ProjectContext)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandBuilder) BuildApprovePoliciesCommands(ctx *command.Context, comment *events.CommentCommand) ([]command.ProjectContext, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandBuilder().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("BuildApprovePoliciesCommands", params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []command.ProjectContext
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]command.ProjectContext)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildApprovePoliciesCommands", _params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []command.ProjectContext
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]command.ProjectContext)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandBuilder) BuildAutoplanCommands(ctx *command.Context) ([]command.ProjectContext, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandBuilder().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("BuildAutoplanCommands", params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []command.ProjectContext
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]command.ProjectContext)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildAutoplanCommands", _params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []command.ProjectContext
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]command.ProjectContext)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandBuilder) BuildImportCommands(ctx *command.Context, comment *events.CommentCommand) ([]command.ProjectContext, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandBuilder().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("BuildImportCommands", params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []command.ProjectContext
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]command.ProjectContext)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildImportCommands", _params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []command.ProjectContext
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]command.ProjectContext)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandBuilder) BuildPlanCommands(ctx *command.Context, comment *events.CommentCommand) ([]command.ProjectContext, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandBuilder().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("BuildPlanCommands", params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []command.ProjectContext
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]command.ProjectContext)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildPlanCommands", _params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []command.ProjectContext
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]command.ProjectContext)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandBuilder) BuildStateRmCommands(ctx *command.Context, comment *events.CommentCommand) ([]command.ProjectContext, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandBuilder().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("BuildStateRmCommands", params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []command.ProjectContext
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]command.ProjectContext)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildStateRmCommands", _params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []command.ProjectContext
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]command.ProjectContext)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandBuilder) BuildVersionCommands(ctx *command.Context, comment *events.CommentCommand) ([]command.ProjectContext, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandBuilder().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("BuildVersionCommands", params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []command.ProjectContext
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]command.ProjectContext)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("BuildVersionCommands", _params, []reflect.Type{reflect.TypeOf((*[]command.ProjectContext)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []command.ProjectContext
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]command.ProjectContext)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandBuilder) VerifyWasCalledOnce() *VerifierMockProjectCommandBuilder {
|
||||
@@ -197,8 +197,8 @@ type VerifierMockProjectCommandBuilder struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandBuilder) BuildApplyCommands(ctx *command.Context, comment *events.CommentCommand) *MockProjectCommandBuilder_BuildApplyCommands_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildApplyCommands", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildApplyCommands", _params, verifier.timeout)
|
||||
return &MockProjectCommandBuilder_BuildApplyCommands_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -213,23 +213,27 @@ func (c *MockProjectCommandBuilder_BuildApplyCommands_OngoingVerification) GetCa
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandBuilder_BuildApplyCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandBuilder) BuildApprovePoliciesCommands(ctx *command.Context, comment *events.CommentCommand) *MockProjectCommandBuilder_BuildApprovePoliciesCommands_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildApprovePoliciesCommands", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildApprovePoliciesCommands", _params, verifier.timeout)
|
||||
return &MockProjectCommandBuilder_BuildApprovePoliciesCommands_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -244,23 +248,27 @@ func (c *MockProjectCommandBuilder_BuildApprovePoliciesCommands_OngoingVerificat
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandBuilder_BuildApprovePoliciesCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandBuilder) BuildAutoplanCommands(ctx *command.Context) *MockProjectCommandBuilder_BuildAutoplanCommands_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildAutoplanCommands", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildAutoplanCommands", _params, verifier.timeout)
|
||||
return &MockProjectCommandBuilder_BuildAutoplanCommands_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -275,19 +283,21 @@ func (c *MockProjectCommandBuilder_BuildAutoplanCommands_OngoingVerification) Ge
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandBuilder_BuildAutoplanCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandBuilder) BuildImportCommands(ctx *command.Context, comment *events.CommentCommand) *MockProjectCommandBuilder_BuildImportCommands_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildImportCommands", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildImportCommands", _params, verifier.timeout)
|
||||
return &MockProjectCommandBuilder_BuildImportCommands_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -302,23 +312,27 @@ func (c *MockProjectCommandBuilder_BuildImportCommands_OngoingVerification) GetC
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandBuilder_BuildImportCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandBuilder) BuildPlanCommands(ctx *command.Context, comment *events.CommentCommand) *MockProjectCommandBuilder_BuildPlanCommands_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildPlanCommands", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildPlanCommands", _params, verifier.timeout)
|
||||
return &MockProjectCommandBuilder_BuildPlanCommands_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -333,23 +347,27 @@ func (c *MockProjectCommandBuilder_BuildPlanCommands_OngoingVerification) GetCap
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandBuilder_BuildPlanCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandBuilder) BuildStateRmCommands(ctx *command.Context, comment *events.CommentCommand) *MockProjectCommandBuilder_BuildStateRmCommands_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildStateRmCommands", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildStateRmCommands", _params, verifier.timeout)
|
||||
return &MockProjectCommandBuilder_BuildStateRmCommands_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -364,23 +382,27 @@ func (c *MockProjectCommandBuilder_BuildStateRmCommands_OngoingVerification) Get
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandBuilder_BuildStateRmCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandBuilder) BuildVersionCommands(ctx *command.Context, comment *events.CommentCommand) *MockProjectCommandBuilder_BuildVersionCommands_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildVersionCommands", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, comment}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "BuildVersionCommands", _params, verifier.timeout)
|
||||
return &MockProjectCommandBuilder_BuildVersionCommands_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -395,15 +417,19 @@ func (c *MockProjectCommandBuilder_BuildVersionCommands_OngoingVerification) Get
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandBuilder_BuildVersionCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*command.Context, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*command.Context, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*command.Context)
|
||||
}
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,105 +29,105 @@ func (mock *MockProjectCommandRunner) Apply(ctx command.ProjectContext) command.
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Apply", params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var ret0 command.ProjectResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(command.ProjectResult)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Apply", _params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var _ret0 command.ProjectResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(command.ProjectResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandRunner) ApprovePolicies(ctx command.ProjectContext) command.ProjectResult {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("ApprovePolicies", params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var ret0 command.ProjectResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(command.ProjectResult)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("ApprovePolicies", _params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var _ret0 command.ProjectResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(command.ProjectResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandRunner) Import(ctx command.ProjectContext) command.ProjectResult {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Import", params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var ret0 command.ProjectResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(command.ProjectResult)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Import", _params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var _ret0 command.ProjectResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(command.ProjectResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandRunner) Plan(ctx command.ProjectContext) command.ProjectResult {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Plan", params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var ret0 command.ProjectResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(command.ProjectResult)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Plan", _params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var _ret0 command.ProjectResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(command.ProjectResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandRunner) PolicyCheck(ctx command.ProjectContext) command.ProjectResult {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("PolicyCheck", params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var ret0 command.ProjectResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(command.ProjectResult)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("PolicyCheck", _params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var _ret0 command.ProjectResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(command.ProjectResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandRunner) StateRm(ctx command.ProjectContext) command.ProjectResult {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("StateRm", params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var ret0 command.ProjectResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(command.ProjectResult)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("StateRm", _params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var _ret0 command.ProjectResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(command.ProjectResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandRunner) Version(ctx command.ProjectContext) command.ProjectResult {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Version", params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var ret0 command.ProjectResult
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(command.ProjectResult)
|
||||
_params := []pegomock.Param{ctx}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Version", _params, []reflect.Type{reflect.TypeOf((*command.ProjectResult)(nil)).Elem()})
|
||||
var _ret0 command.ProjectResult
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(command.ProjectResult)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandRunner) VerifyWasCalledOnce() *VerifierMockProjectCommandRunner {
|
||||
@@ -168,8 +168,8 @@ type VerifierMockProjectCommandRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandRunner) Apply(ctx command.ProjectContext) *MockProjectCommandRunner_Apply_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Apply", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Apply", _params, verifier.timeout)
|
||||
return &MockProjectCommandRunner_Apply_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -184,19 +184,21 @@ func (c *MockProjectCommandRunner_Apply_OngoingVerification) GetCapturedArgument
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandRunner_Apply_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandRunner) ApprovePolicies(ctx command.ProjectContext) *MockProjectCommandRunner_ApprovePolicies_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ApprovePolicies", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ApprovePolicies", _params, verifier.timeout)
|
||||
return &MockProjectCommandRunner_ApprovePolicies_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -211,19 +213,21 @@ func (c *MockProjectCommandRunner_ApprovePolicies_OngoingVerification) GetCaptur
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandRunner_ApprovePolicies_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandRunner) Import(ctx command.ProjectContext) *MockProjectCommandRunner_Import_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Import", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Import", _params, verifier.timeout)
|
||||
return &MockProjectCommandRunner_Import_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -238,19 +242,21 @@ func (c *MockProjectCommandRunner_Import_OngoingVerification) GetCapturedArgumen
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandRunner_Import_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandRunner) Plan(ctx command.ProjectContext) *MockProjectCommandRunner_Plan_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Plan", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Plan", _params, verifier.timeout)
|
||||
return &MockProjectCommandRunner_Plan_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -265,19 +271,21 @@ func (c *MockProjectCommandRunner_Plan_OngoingVerification) GetCapturedArguments
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandRunner_Plan_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandRunner) PolicyCheck(ctx command.ProjectContext) *MockProjectCommandRunner_PolicyCheck_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PolicyCheck", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PolicyCheck", _params, verifier.timeout)
|
||||
return &MockProjectCommandRunner_PolicyCheck_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -292,19 +300,21 @@ func (c *MockProjectCommandRunner_PolicyCheck_OngoingVerification) GetCapturedAr
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandRunner_PolicyCheck_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandRunner) StateRm(ctx command.ProjectContext) *MockProjectCommandRunner_StateRm_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "StateRm", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "StateRm", _params, verifier.timeout)
|
||||
return &MockProjectCommandRunner_StateRm_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -319,19 +329,21 @@ func (c *MockProjectCommandRunner_StateRm_OngoingVerification) GetCapturedArgume
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandRunner_StateRm_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandRunner) Version(ctx command.ProjectContext) *MockProjectCommandRunner_Version_OngoingVerification {
|
||||
params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Version", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Version", _params, verifier.timeout)
|
||||
return &MockProjectCommandRunner_Version_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -346,11 +358,13 @@ func (c *MockProjectCommandRunner_Version_OngoingVerification) GetCapturedArgume
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandRunner_Version_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -31,19 +31,19 @@ func (mock *MockProjectLocker) TryLock(log logging.SimpleLogging, pull models.Pu
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectLocker().")
|
||||
}
|
||||
params := []pegomock.Param{log, pull, user, workspace, project, repoLocking}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", params, []reflect.Type{reflect.TypeOf((**events.TryLockResponse)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *events.TryLockResponse
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*events.TryLockResponse)
|
||||
_params := []pegomock.Param{log, pull, user, workspace, project, repoLocking}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", _params, []reflect.Type{reflect.TypeOf((**events.TryLockResponse)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *events.TryLockResponse
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*events.TryLockResponse)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectLocker) VerifyWasCalledOnce() *VerifierMockProjectLocker {
|
||||
@@ -84,8 +84,8 @@ type VerifierMockProjectLocker struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectLocker) TryLock(log logging.SimpleLogging, pull models.PullRequest, user models.User, workspace string, project models.Project, repoLocking bool) *MockProjectLocker_TryLock_OngoingVerification {
|
||||
params := []pegomock.Param{log, pull, user, workspace, project, repoLocking}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{log, pull, user, workspace, project, repoLocking}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", _params, verifier.timeout)
|
||||
return &MockProjectLocker_TryLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -100,31 +100,43 @@ func (c *MockProjectLocker_TryLock_OngoingVerification) GetCapturedArguments() (
|
||||
}
|
||||
|
||||
func (c *MockProjectLocker_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.PullRequest, _param2 []models.User, _param3 []string, _param4 []models.Project, _param5 []bool) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.User)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.User)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(models.Project)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(models.Project)
|
||||
}
|
||||
}
|
||||
_param5 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(bool)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(bool)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,15 +30,15 @@ func (mock *MockPullCleaner) CleanUpPull(logger logging.SimpleLogging, repo mode
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPullCleaner().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repo, pull}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("CleanUpPull", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, repo, pull}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("CleanUpPull", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockPullCleaner) VerifyWasCalledOnce() *VerifierMockPullCleaner {
|
||||
@@ -79,8 +79,8 @@ type VerifierMockPullCleaner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPullCleaner) CleanUpPull(logger logging.SimpleLogging, repo models.Repo, pull models.PullRequest) *MockPullCleaner_CleanUpPull_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repo, pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CleanUpPull", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repo, pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CleanUpPull", _params, verifier.timeout)
|
||||
return &MockPullCleaner_CleanUpPull_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -95,19 +95,25 @@ func (c *MockPullCleaner_CleanUpPull_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockPullCleaner_CleanUpPull_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,8 +29,8 @@ func (mock *MockResourceCleaner) CleanUp(pullInfo jobs.PullInfo) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockResourceCleaner().")
|
||||
}
|
||||
params := []pegomock.Param{pullInfo}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("CleanUp", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{pullInfo}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("CleanUp", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockResourceCleaner) VerifyWasCalledOnce() *VerifierMockResourceCleaner {
|
||||
@@ -71,8 +71,8 @@ type VerifierMockResourceCleaner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockResourceCleaner) CleanUp(pullInfo jobs.PullInfo) *MockResourceCleaner_CleanUp_OngoingVerification {
|
||||
params := []pegomock.Param{pullInfo}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CleanUp", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pullInfo}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CleanUp", _params, verifier.timeout)
|
||||
return &MockResourceCleaner_CleanUp_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -87,11 +87,13 @@ func (c *MockResourceCleaner_CleanUp_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockResourceCleaner_CleanUp_OngoingVerification) GetAllCapturedArguments() (_param0 []jobs.PullInfo) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]jobs.PullInfo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(jobs.PullInfo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]jobs.PullInfo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(jobs.PullInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockStepRunner) Run(ctx command.ProjectContext, extraArgs []string,
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockStepRunner().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockStepRunner) VerifyWasCalledOnce() *VerifierMockStepRunner {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockStepRunner struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockStepRunner) Run(ctx command.ProjectContext, extraArgs []string, path string, envs map[string]string) *MockStepRunner_Run_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, extraArgs, path, envs}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockStepRunner_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,23 +98,31 @@ func (c *MockStepRunner_Run_OngoingVerification) GetCapturedArguments() (command
|
||||
}
|
||||
|
||||
func (c *MockStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 [][]string, _param2 []string, _param3 []map[string]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.([]string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,15 +30,15 @@ func (mock *MockWebhooksSender) Send(log logging.SimpleLogging, res webhooks.App
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWebhooksSender().")
|
||||
}
|
||||
params := []pegomock.Param{log, res}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Send", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{log, res}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Send", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWebhooksSender) VerifyWasCalledOnce() *VerifierMockWebhooksSender {
|
||||
@@ -79,8 +79,8 @@ type VerifierMockWebhooksSender struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWebhooksSender) Send(log logging.SimpleLogging, res webhooks.ApplyResult) *MockWebhooksSender_Send_OngoingVerification {
|
||||
params := []pegomock.Param{log, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", params, verifier.timeout)
|
||||
_params := []pegomock.Param{log, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", _params, verifier.timeout)
|
||||
return &MockWebhooksSender_Send_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -95,15 +95,19 @@ func (c *MockWebhooksSender_Send_OngoingVerification) GetCapturedArguments() (lo
|
||||
}
|
||||
|
||||
func (c *MockWebhooksSender_Send_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []webhooks.ApplyResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,148 +30,148 @@ func (mock *MockWorkingDir) Clone(logger logging.SimpleLogging, headRepo models.
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 bool
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 bool
|
||||
var _ret2 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(bool)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(bool)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
if _result[2] != nil {
|
||||
_ret2 = _result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1, ret2
|
||||
return _ret0, _ret1, _ret2
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) Delete(logger logging.SimpleLogging, r models.Repo, p models.PullRequest) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Delete", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, r, p}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Delete", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) DeleteForWorkspace(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteForWorkspace", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeleteForWorkspace", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) DeletePlan(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string, path string, projectName string) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePlan", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("DeletePlan", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetGitUntrackedFiles(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) ([]string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetGitUntrackedFiles", params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]string)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetGitUntrackedFiles", _params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetPullDir(r models.Repo, p models.PullRequest) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{r, p}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullDir", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{r, p}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullDir", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetWorkingDir(r models.Repo, p models.PullRequest, workspace string) (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{r, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetWorkingDir", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{r, p, workspace}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetWorkingDir", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) HasDiverged(logger logging.SimpleLogging, cloneDir string) bool {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{logger, cloneDir}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("HasDiverged", params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var ret0 bool
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(bool)
|
||||
_params := []pegomock.Param{logger, cloneDir}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("HasDiverged", _params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var _ret0 bool
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(bool)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) SetCheckForUpstreamChanges() {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SetCheckForUpstreamChanges", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SetCheckForUpstreamChanges", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) VerifyWasCalledOnce() *VerifierMockWorkingDir {
|
||||
@@ -212,8 +212,8 @@ type VerifierMockWorkingDir struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) Clone(logger logging.SimpleLogging, headRepo models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_Clone_OngoingVerification {
|
||||
params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Clone", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, headRepo, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Clone", _params, verifier.timeout)
|
||||
return &MockWorkingDir_Clone_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -228,31 +228,39 @@ func (c *MockWorkingDir_Clone_OngoingVerification) GetCapturedArguments() (loggi
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_Clone_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) Delete(logger logging.SimpleLogging, r models.Repo, p models.PullRequest) *MockWorkingDir_Delete_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Delete", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Delete", _params, verifier.timeout)
|
||||
return &MockWorkingDir_Delete_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -267,27 +275,33 @@ func (c *MockWorkingDir_Delete_OngoingVerification) GetCapturedArguments() (logg
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_Delete_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) DeleteForWorkspace(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_DeleteForWorkspace_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteForWorkspace", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeleteForWorkspace", _params, verifier.timeout)
|
||||
return &MockWorkingDir_DeleteForWorkspace_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -302,31 +316,39 @@ func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetCapturedArgum
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) DeletePlan(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string, path string, projectName string) *MockWorkingDir_DeletePlan_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePlan", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p, workspace, path, projectName}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "DeletePlan", _params, verifier.timeout)
|
||||
return &MockWorkingDir_DeletePlan_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -341,39 +363,51 @@ func (c *MockWorkingDir_DeletePlan_OngoingVerification) GetCapturedArguments() (
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_DeletePlan_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string, _param4 []string, _param5 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(string)
|
||||
if len(_params) > 5 {
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[5] {
|
||||
_param5[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) GetGitUntrackedFiles(logger logging.SimpleLogging, r models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_GetGitUntrackedFiles_OngoingVerification {
|
||||
params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetGitUntrackedFiles", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetGitUntrackedFiles", _params, verifier.timeout)
|
||||
return &MockWorkingDir_GetGitUntrackedFiles_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -388,31 +422,39 @@ func (c *MockWorkingDir_GetGitUntrackedFiles_OngoingVerification) GetCapturedArg
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_GetGitUntrackedFiles_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) GetPullDir(r models.Repo, p models.PullRequest) *MockWorkingDir_GetPullDir_OngoingVerification {
|
||||
params := []pegomock.Param{r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullDir", params, verifier.timeout)
|
||||
_params := []pegomock.Param{r, p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullDir", _params, verifier.timeout)
|
||||
return &MockWorkingDir_GetPullDir_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -427,23 +469,27 @@ func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetCapturedArguments() (
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) GetWorkingDir(r models.Repo, p models.PullRequest, workspace string) *MockWorkingDir_GetWorkingDir_OngoingVerification {
|
||||
params := []pegomock.Param{r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetWorkingDir", params, verifier.timeout)
|
||||
_params := []pegomock.Param{r, p, workspace}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetWorkingDir", _params, verifier.timeout)
|
||||
return &MockWorkingDir_GetWorkingDir_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -458,27 +504,33 @@ func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetCapturedArguments(
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) HasDiverged(logger logging.SimpleLogging, cloneDir string) *MockWorkingDir_HasDiverged_OngoingVerification {
|
||||
params := []pegomock.Param{logger, cloneDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "HasDiverged", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, cloneDir}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "HasDiverged", _params, verifier.timeout)
|
||||
return &MockWorkingDir_HasDiverged_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -493,23 +545,27 @@ func (c *MockWorkingDir_HasDiverged_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockWorkingDir_HasDiverged_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDir) SetCheckForUpstreamChanges() *MockWorkingDir_SetCheckForUpstreamChanges_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetCheckForUpstreamChanges", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetCheckForUpstreamChanges", _params, verifier.timeout)
|
||||
return &MockWorkingDir_SetCheckForUpstreamChanges_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,38 +28,38 @@ func (mock *MockWorkingDirLocker) TryLock(repoFullName string, pullNum int, work
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDirLocker().")
|
||||
}
|
||||
params := []pegomock.Param{repoFullName, pullNum, workspace, path}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", params, []reflect.Type{reflect.TypeOf((*func())(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 func()
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(func())
|
||||
_params := []pegomock.Param{repoFullName, pullNum, workspace, path}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("TryLock", _params, []reflect.Type{reflect.TypeOf((*func())(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 func()
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(func())
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDirLocker) TryLockPull(repoFullName string, pullNum int) (func(), error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDirLocker().")
|
||||
}
|
||||
params := []pegomock.Param{repoFullName, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("TryLockPull", params, []reflect.Type{reflect.TypeOf((*func())(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 func()
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(func())
|
||||
_params := []pegomock.Param{repoFullName, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("TryLockPull", _params, []reflect.Type{reflect.TypeOf((*func())(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 func()
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(func())
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDirLocker) VerifyWasCalledOnce() *VerifierMockWorkingDirLocker {
|
||||
@@ -100,8 +100,8 @@ type VerifierMockWorkingDirLocker struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDirLocker) TryLock(repoFullName string, pullNum int, workspace string, path string) *MockWorkingDirLocker_TryLock_OngoingVerification {
|
||||
params := []pegomock.Param{repoFullName, pullNum, workspace, path}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", params, verifier.timeout)
|
||||
_params := []pegomock.Param{repoFullName, pullNum, workspace, path}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLock", _params, verifier.timeout)
|
||||
return &MockWorkingDirLocker_TryLock_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -116,31 +116,39 @@ func (c *MockWorkingDirLocker_TryLock_OngoingVerification) GetCapturedArguments(
|
||||
}
|
||||
|
||||
func (c *MockWorkingDirLocker_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int, _param2 []string, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
}
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockWorkingDirLocker) TryLockPull(repoFullName string, pullNum int) *MockWorkingDirLocker_TryLockPull_OngoingVerification {
|
||||
params := []pegomock.Param{repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLockPull", params, verifier.timeout)
|
||||
_params := []pegomock.Param{repoFullName, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TryLockPull", _params, verifier.timeout)
|
||||
return &MockWorkingDirLocker_TryLockPull_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -155,15 +163,19 @@ func (c *MockWorkingDirLocker_TryLockPull_OngoingVerification) GetCapturedArgume
|
||||
}
|
||||
|
||||
func (c *MockWorkingDirLocker_TryLockPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,57 +29,57 @@ func (mock *MockGithubCredentials) Client() (*http.Client, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGithubCredentials().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Client", params, []reflect.Type{reflect.TypeOf((**http.Client)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *http.Client
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*http.Client)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Client", _params, []reflect.Type{reflect.TypeOf((**http.Client)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *http.Client
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*http.Client)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGithubCredentials) GetToken() (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGithubCredentials().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetToken", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetToken", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGithubCredentials) GetUser() (string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGithubCredentials().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetUser", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetUser", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGithubCredentials) VerifyWasCalledOnce() *VerifierMockGithubCredentials {
|
||||
@@ -120,8 +120,8 @@ type VerifierMockGithubCredentials struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGithubCredentials) Client() *MockGithubCredentials_Client_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Client", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Client", _params, verifier.timeout)
|
||||
return &MockGithubCredentials_Client_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -137,8 +137,8 @@ func (c *MockGithubCredentials_Client_OngoingVerification) GetAllCapturedArgumen
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGithubCredentials) GetToken() *MockGithubCredentials_GetToken_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetToken", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetToken", _params, verifier.timeout)
|
||||
return &MockGithubCredentials_GetToken_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -154,8 +154,8 @@ func (c *MockGithubCredentials_GetToken_OngoingVerification) GetAllCapturedArgum
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGithubCredentials) GetUser() *MockGithubCredentials_GetUser_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetUser", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetUser", _params, verifier.timeout)
|
||||
return &MockGithubCredentials_GetUser_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,19 +31,19 @@ func (mock *MockGithubPullRequestGetter) GetPullRequest(logger logging.SimpleLog
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockGithubPullRequestGetter().")
|
||||
}
|
||||
params := []pegomock.Param{logger, repo, pullNum}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullRequest", params, []reflect.Type{reflect.TypeOf((**github.PullRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *github.PullRequest
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*github.PullRequest)
|
||||
_params := []pegomock.Param{logger, repo, pullNum}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullRequest", _params, []reflect.Type{reflect.TypeOf((**github.PullRequest)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *github.PullRequest
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*github.PullRequest)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockGithubPullRequestGetter) VerifyWasCalledOnce() *VerifierMockGithubPullRequestGetter {
|
||||
@@ -84,8 +84,8 @@ type VerifierMockGithubPullRequestGetter struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockGithubPullRequestGetter) GetPullRequest(logger logging.SimpleLogging, repo models.Repo, pullNum int) *MockGithubPullRequestGetter_GetPullRequest_OngoingVerification {
|
||||
params := []pegomock.Param{logger, repo, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullRequest", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, repo, pullNum}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullRequest", _params, verifier.timeout)
|
||||
return &MockGithubPullRequestGetter_GetPullRequest_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -100,19 +100,25 @@ func (c *MockGithubPullRequestGetter_GetPullRequest_OngoingVerification) GetCapt
|
||||
}
|
||||
|
||||
func (c *MockGithubPullRequestGetter_GetPullRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.Repo, _param2 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
}
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(int)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(int)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,19 +30,19 @@ func (mock *MockPullReqStatusFetcher) FetchPullStatus(logger logging.SimpleLoggi
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockPullReqStatusFetcher().")
|
||||
}
|
||||
params := []pegomock.Param{logger, pull}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("FetchPullStatus", params, []reflect.Type{reflect.TypeOf((*models.PullReqStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 models.PullReqStatus
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(models.PullReqStatus)
|
||||
_params := []pegomock.Param{logger, pull}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("FetchPullStatus", _params, []reflect.Type{reflect.TypeOf((*models.PullReqStatus)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 models.PullReqStatus
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(models.PullReqStatus)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockPullReqStatusFetcher) VerifyWasCalledOnce() *VerifierMockPullReqStatusFetcher {
|
||||
@@ -83,8 +83,8 @@ type VerifierMockPullReqStatusFetcher struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockPullReqStatusFetcher) FetchPullStatus(logger logging.SimpleLogging, pull models.PullRequest) *MockPullReqStatusFetcher_FetchPullStatus_OngoingVerification {
|
||||
params := []pegomock.Param{logger, pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "FetchPullStatus", params, verifier.timeout)
|
||||
_params := []pegomock.Param{logger, pull}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "FetchPullStatus", _params, verifier.timeout)
|
||||
return &MockPullReqStatusFetcher_FetchPullStatus_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -99,15 +99,19 @@ func (c *MockPullReqStatusFetcher_FetchPullStatus_OngoingVerification) GetCaptur
|
||||
}
|
||||
|
||||
func (c *MockPullReqStatusFetcher_FetchPullStatus_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,15 +30,15 @@ func (mock *MockSender) Send(log logging.SimpleLogging, applyResult webhooks.App
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSender().")
|
||||
}
|
||||
params := []pegomock.Param{log, applyResult}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Send", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{log, applyResult}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Send", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSender) VerifyWasCalledOnce() *VerifierMockSender {
|
||||
@@ -79,8 +79,8 @@ type VerifierMockSender struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSender) Send(log logging.SimpleLogging, applyResult webhooks.ApplyResult) *MockSender_Send_OngoingVerification {
|
||||
params := []pegomock.Param{log, applyResult}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", params, verifier.timeout)
|
||||
_params := []pegomock.Param{log, applyResult}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", _params, verifier.timeout)
|
||||
return &MockSender_Send_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -95,15 +95,19 @@ func (c *MockSender_Send_OngoingVerification) GetCapturedArguments() (logging.Si
|
||||
}
|
||||
|
||||
func (c *MockSender_Send_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.SimpleLogging, _param1 []webhooks.ApplyResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.SimpleLogging, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,45 +29,45 @@ func (mock *MockSlackClient) AuthTest() error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSlackClient().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("AuthTest", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("AuthTest", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSlackClient) PostMessage(channel string, applyResult webhooks.ApplyResult) error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSlackClient().")
|
||||
}
|
||||
params := []pegomock.Param{channel, applyResult}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("PostMessage", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{channel, applyResult}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("PostMessage", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSlackClient) TokenIsSet() bool {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSlackClient().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("TokenIsSet", params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var ret0 bool
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(bool)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("TokenIsSet", _params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var _ret0 bool
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(bool)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSlackClient) VerifyWasCalledOnce() *VerifierMockSlackClient {
|
||||
@@ -108,8 +108,8 @@ type VerifierMockSlackClient struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSlackClient) AuthTest() *MockSlackClient_AuthTest_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "AuthTest", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "AuthTest", _params, verifier.timeout)
|
||||
return &MockSlackClient_AuthTest_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -125,8 +125,8 @@ func (c *MockSlackClient_AuthTest_OngoingVerification) GetAllCapturedArguments()
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSlackClient) PostMessage(channel string, applyResult webhooks.ApplyResult) *MockSlackClient_PostMessage_OngoingVerification {
|
||||
params := []pegomock.Param{channel, applyResult}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PostMessage", params, verifier.timeout)
|
||||
_params := []pegomock.Param{channel, applyResult}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PostMessage", _params, verifier.timeout)
|
||||
return &MockSlackClient_PostMessage_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -141,23 +141,27 @@ func (c *MockSlackClient_PostMessage_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockSlackClient_PostMessage_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []webhooks.ApplyResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSlackClient) TokenIsSet() *MockSlackClient_TokenIsSet_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TokenIsSet", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "TokenIsSet", _params, verifier.timeout)
|
||||
return &MockSlackClient_TokenIsSet_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,68 +29,68 @@ func (mock *MockUnderlyingSlackClient) AuthTest() (*slack.AuthTestResponse, erro
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockUnderlyingSlackClient().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("AuthTest", params, []reflect.Type{reflect.TypeOf((**slack.AuthTestResponse)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 *slack.AuthTestResponse
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(*slack.AuthTestResponse)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("AuthTest", _params, []reflect.Type{reflect.TypeOf((**slack.AuthTestResponse)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 *slack.AuthTestResponse
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(*slack.AuthTestResponse)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockUnderlyingSlackClient) GetConversations(conversationParams *slack.GetConversationsParameters) ([]slack.Channel, string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockUnderlyingSlackClient().")
|
||||
}
|
||||
params := []pegomock.Param{conversationParams}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetConversations", params, []reflect.Type{reflect.TypeOf((*[]slack.Channel)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 []slack.Channel
|
||||
var ret1 string
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]slack.Channel)
|
||||
_params := []pegomock.Param{conversationParams}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetConversations", _params, []reflect.Type{reflect.TypeOf((*[]slack.Channel)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 []slack.Channel
|
||||
var _ret1 string
|
||||
var _ret2 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]slack.Channel)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(string)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(string)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
if _result[2] != nil {
|
||||
_ret2 = _result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1, ret2
|
||||
return _ret0, _ret1, _ret2
|
||||
}
|
||||
|
||||
func (mock *MockUnderlyingSlackClient) PostMessage(channelID string, options ...slack.MsgOption) (string, string, error) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockUnderlyingSlackClient().")
|
||||
}
|
||||
params := []pegomock.Param{channelID}
|
||||
_params := []pegomock.Param{channelID}
|
||||
for _, param := range options {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("PostMessage", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 string
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("PostMessage", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 string
|
||||
var _ret2 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(string)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(string)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
if _result[2] != nil {
|
||||
_ret2 = _result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1, ret2
|
||||
return _ret0, _ret1, _ret2
|
||||
}
|
||||
|
||||
func (mock *MockUnderlyingSlackClient) VerifyWasCalledOnce() *VerifierMockUnderlyingSlackClient {
|
||||
@@ -131,8 +131,8 @@ type VerifierMockUnderlyingSlackClient struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockUnderlyingSlackClient) AuthTest() *MockUnderlyingSlackClient_AuthTest_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "AuthTest", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "AuthTest", _params, verifier.timeout)
|
||||
return &MockUnderlyingSlackClient_AuthTest_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -148,8 +148,8 @@ func (c *MockUnderlyingSlackClient_AuthTest_OngoingVerification) GetAllCapturedA
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockUnderlyingSlackClient) GetConversations(conversationParams *slack.GetConversationsParameters) *MockUnderlyingSlackClient_GetConversations_OngoingVerification {
|
||||
params := []pegomock.Param{conversationParams}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetConversations", params, verifier.timeout)
|
||||
_params := []pegomock.Param{conversationParams}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetConversations", _params, verifier.timeout)
|
||||
return &MockUnderlyingSlackClient_GetConversations_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -164,22 +164,24 @@ func (c *MockUnderlyingSlackClient_GetConversations_OngoingVerification) GetCapt
|
||||
}
|
||||
|
||||
func (c *MockUnderlyingSlackClient_GetConversations_OngoingVerification) GetAllCapturedArguments() (_param0 []*slack.GetConversationsParameters) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*slack.GetConversationsParameters, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*slack.GetConversationsParameters)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]*slack.GetConversationsParameters, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(*slack.GetConversationsParameters)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockUnderlyingSlackClient) PostMessage(channelID string, options ...slack.MsgOption) *MockUnderlyingSlackClient_PostMessage_OngoingVerification {
|
||||
params := []pegomock.Param{channelID}
|
||||
_params := []pegomock.Param{channelID}
|
||||
for _, param := range options {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PostMessage", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "PostMessage", _params, verifier.timeout)
|
||||
return &MockUnderlyingSlackClient_PostMessage_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -194,18 +196,20 @@ func (c *MockUnderlyingSlackClient_PostMessage_OngoingVerification) GetCapturedA
|
||||
}
|
||||
|
||||
func (c *MockUnderlyingSlackClient_PostMessage_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]slack.MsgOption) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]slack.MsgOption, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]slack.MsgOption, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param1[u][x-1] = params[x][u].(slack.MsgOption)
|
||||
_param1[u] = make([]slack.MsgOption, len(_params)-1)
|
||||
for x := 1; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param1[u][x-1] = _params[x][u].(slack.MsgOption)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,78 +31,78 @@ func (mock *MockProjectCommandOutputHandler) CleanUp(pullInfo jobs.PullInfo) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{pullInfo}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("CleanUp", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{pullInfo}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("CleanUp", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) Deregister(jobID string, receiver chan string) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{jobID, receiver}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Deregister", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{jobID, receiver}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Deregister", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) GetPullToJobMapping() []jobs.PullInfoWithJobIDs {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullToJobMapping", params, []reflect.Type{reflect.TypeOf((*[]jobs.PullInfoWithJobIDs)(nil)).Elem()})
|
||||
var ret0 []jobs.PullInfoWithJobIDs
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].([]jobs.PullInfoWithJobIDs)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetPullToJobMapping", _params, []reflect.Type{reflect.TypeOf((*[]jobs.PullInfoWithJobIDs)(nil)).Elem()})
|
||||
var _ret0 []jobs.PullInfoWithJobIDs
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].([]jobs.PullInfoWithJobIDs)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) Handle() {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Handle", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Handle", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) IsKeyExists(key string) bool {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{key}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("IsKeyExists", params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var ret0 bool
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(bool)
|
||||
_params := []pegomock.Param{key}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("IsKeyExists", _params, []reflect.Type{reflect.TypeOf((*bool)(nil)).Elem()})
|
||||
var _ret0 bool
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(bool)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) Register(jobID string, receiver chan string) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{jobID, receiver}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Register", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{jobID, receiver}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Register", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) Send(ctx command.ProjectContext, msg string, operationComplete bool) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Send", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Send", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) SendWorkflowHook(ctx models.WorkflowHookCommandContext, msg string, operationComplete bool) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectCommandOutputHandler().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SendWorkflowHook", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SendWorkflowHook", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockProjectCommandOutputHandler) VerifyWasCalledOnce() *VerifierMockProjectCommandOutputHandler {
|
||||
@@ -143,8 +143,8 @@ type VerifierMockProjectCommandOutputHandler struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) CleanUp(pullInfo jobs.PullInfo) *MockProjectCommandOutputHandler_CleanUp_OngoingVerification {
|
||||
params := []pegomock.Param{pullInfo}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CleanUp", params, verifier.timeout)
|
||||
_params := []pegomock.Param{pullInfo}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CleanUp", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_CleanUp_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -159,19 +159,21 @@ func (c *MockProjectCommandOutputHandler_CleanUp_OngoingVerification) GetCapture
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandOutputHandler_CleanUp_OngoingVerification) GetAllCapturedArguments() (_param0 []jobs.PullInfo) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]jobs.PullInfo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(jobs.PullInfo)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]jobs.PullInfo, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(jobs.PullInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) Deregister(jobID string, receiver chan string) *MockProjectCommandOutputHandler_Deregister_OngoingVerification {
|
||||
params := []pegomock.Param{jobID, receiver}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Deregister", params, verifier.timeout)
|
||||
_params := []pegomock.Param{jobID, receiver}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Deregister", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_Deregister_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -186,23 +188,27 @@ func (c *MockProjectCommandOutputHandler_Deregister_OngoingVerification) GetCapt
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandOutputHandler_Deregister_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []chan string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]chan string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(chan string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]chan string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(chan string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) GetPullToJobMapping() *MockProjectCommandOutputHandler_GetPullToJobMapping_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullToJobMapping", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetPullToJobMapping", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_GetPullToJobMapping_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -218,8 +224,8 @@ func (c *MockProjectCommandOutputHandler_GetPullToJobMapping_OngoingVerification
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) Handle() *MockProjectCommandOutputHandler_Handle_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Handle", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Handle", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_Handle_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -235,8 +241,8 @@ func (c *MockProjectCommandOutputHandler_Handle_OngoingVerification) GetAllCaptu
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) IsKeyExists(key string) *MockProjectCommandOutputHandler_IsKeyExists_OngoingVerification {
|
||||
params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "IsKeyExists", params, verifier.timeout)
|
||||
_params := []pegomock.Param{key}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "IsKeyExists", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_IsKeyExists_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -251,19 +257,21 @@ func (c *MockProjectCommandOutputHandler_IsKeyExists_OngoingVerification) GetCap
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandOutputHandler_IsKeyExists_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) Register(jobID string, receiver chan string) *MockProjectCommandOutputHandler_Register_OngoingVerification {
|
||||
params := []pegomock.Param{jobID, receiver}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Register", params, verifier.timeout)
|
||||
_params := []pegomock.Param{jobID, receiver}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Register", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_Register_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -278,23 +286,27 @@ func (c *MockProjectCommandOutputHandler_Register_OngoingVerification) GetCaptur
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandOutputHandler_Register_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []chan string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([]chan string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(chan string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]chan string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(chan string)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) Send(ctx command.ProjectContext, msg string, operationComplete bool) *MockProjectCommandOutputHandler_Send_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Send", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_Send_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -309,27 +321,33 @@ func (c *MockProjectCommandOutputHandler_Send_OngoingVerification) GetCapturedAr
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandOutputHandler_Send_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []string, _param2 []bool) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(bool)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(bool)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectCommandOutputHandler) SendWorkflowHook(ctx models.WorkflowHookCommandContext, msg string, operationComplete bool) *MockProjectCommandOutputHandler_SendWorkflowHook_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SendWorkflowHook", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, msg, operationComplete}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SendWorkflowHook", _params, verifier.timeout)
|
||||
return &MockProjectCommandOutputHandler_SendWorkflowHook_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -344,19 +362,25 @@ func (c *MockProjectCommandOutputHandler_SendWorkflowHook_OngoingVerification) G
|
||||
}
|
||||
|
||||
func (c *MockProjectCommandOutputHandler_SendWorkflowHook_OngoingVerification) GetAllCapturedArguments() (_param0 []models.WorkflowHookCommandContext, _param1 []string, _param2 []bool) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.WorkflowHookCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.WorkflowHookCommandContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]models.WorkflowHookCommandContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(models.WorkflowHookCommandContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(bool)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(bool)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,19 +29,19 @@ func (mock *MockProjectJobURLGenerator) GenerateProjectJobURL(p command.ProjectC
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectJobURLGenerator().")
|
||||
}
|
||||
params := []pegomock.Param{p}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateProjectJobURL", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{p}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GenerateProjectJobURL", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
var _ret1 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
if _result[1] != nil {
|
||||
_ret1 = _result[1].(error)
|
||||
}
|
||||
}
|
||||
return ret0, ret1
|
||||
return _ret0, _ret1
|
||||
}
|
||||
|
||||
func (mock *MockProjectJobURLGenerator) VerifyWasCalledOnce() *VerifierMockProjectJobURLGenerator {
|
||||
@@ -82,8 +82,8 @@ type VerifierMockProjectJobURLGenerator struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectJobURLGenerator) GenerateProjectJobURL(p command.ProjectContext) *MockProjectJobURLGenerator_GenerateProjectJobURL_OngoingVerification {
|
||||
params := []pegomock.Param{p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateProjectJobURL", params, verifier.timeout)
|
||||
_params := []pegomock.Param{p}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GenerateProjectJobURL", _params, verifier.timeout)
|
||||
return &MockProjectJobURLGenerator_GenerateProjectJobURL_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -98,11 +98,13 @@ func (c *MockProjectJobURLGenerator_GenerateProjectJobURL_OngoingVerification) G
|
||||
}
|
||||
|
||||
func (c *MockProjectJobURLGenerator_GenerateProjectJobURL_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -30,15 +30,15 @@ func (mock *MockProjectStatusUpdater) UpdateProject(ctx command.ProjectContext,
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockProjectStatusUpdater().")
|
||||
}
|
||||
params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateProject", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("UpdateProject", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockProjectStatusUpdater) VerifyWasCalledOnce() *VerifierMockProjectStatusUpdater {
|
||||
@@ -79,8 +79,8 @@ type VerifierMockProjectStatusUpdater struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockProjectStatusUpdater) UpdateProject(ctx command.ProjectContext, cmdName command.Name, status models.CommitStatus, url string, res *command.ProjectResult) *MockProjectStatusUpdater_UpdateProject_OngoingVerification {
|
||||
params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateProject", params, verifier.timeout)
|
||||
_params := []pegomock.Param{ctx, cmdName, status, url, res}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "UpdateProject", _params, verifier.timeout)
|
||||
return &MockProjectStatusUpdater_UpdateProject_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -95,27 +95,37 @@ func (c *MockProjectStatusUpdater_UpdateProject_OngoingVerification) GetCaptured
|
||||
}
|
||||
|
||||
func (c *MockProjectStatusUpdater_UpdateProject_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 []command.Name, _param2 []models.CommitStatus, _param3 []string, _param4 []*command.ProjectResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]command.ProjectContext, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(command.ProjectContext)
|
||||
}
|
||||
}
|
||||
_param1 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(command.Name)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]command.Name, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(command.Name)
|
||||
}
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
if len(_params) > 2 {
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range _params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
}
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
if len(_params) > 3 {
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param4 = make([]*command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(*command.ProjectResult)
|
||||
if len(_params) > 4 {
|
||||
_param4 = make([]*command.ProjectResult, len(c.methodInvocations))
|
||||
for u, param := range _params[4] {
|
||||
_param4[u] = param.(*command.ProjectResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -29,129 +29,129 @@ func (mock *MockSimpleLogging) Debug(format string, a ...interface{}) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Debug", params, []reflect.Type{})
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Debug", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) Err(format string, a ...interface{}) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Err", params, []reflect.Type{})
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Err", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) Flush() error {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Flush", params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(error)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("Flush", _params, []reflect.Type{reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var _ret0 error
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(error)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) GetHistory() string {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("GetHistory", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem()})
|
||||
var ret0 string
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
_params := []pegomock.Param{}
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("GetHistory", _params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem()})
|
||||
var _ret0 string
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(string)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) Info(format string, a ...interface{}) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Info", params, []reflect.Type{})
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Info", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) Log(level logging.LogLevel, format string, a ...interface{}) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{level, format}
|
||||
_params := []pegomock.Param{level, format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Log", params, []reflect.Type{})
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Log", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) SetLevel(lvl logging.LogLevel) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{lvl}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SetLevel", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{lvl}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("SetLevel", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) Warn(format string, a ...interface{}) {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Warn", params, []reflect.Type{})
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Warn", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) With(a ...interface{}) logging.SimpleLogging {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
_params := []pegomock.Param{}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("With", params, []reflect.Type{reflect.TypeOf((*logging.SimpleLogging)(nil)).Elem()})
|
||||
var ret0 logging.SimpleLogging
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(logging.SimpleLogging)
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("With", _params, []reflect.Type{reflect.TypeOf((*logging.SimpleLogging)(nil)).Elem()})
|
||||
var _ret0 logging.SimpleLogging
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) WithHistory(a ...interface{}) logging.SimpleLogging {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockSimpleLogging().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
_params := []pegomock.Param{}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("WithHistory", params, []reflect.Type{reflect.TypeOf((*logging.SimpleLogging)(nil)).Elem()})
|
||||
var ret0 logging.SimpleLogging
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(logging.SimpleLogging)
|
||||
_result := pegomock.GetGenericMockFrom(mock).Invoke("WithHistory", _params, []reflect.Type{reflect.TypeOf((*logging.SimpleLogging)(nil)).Elem()})
|
||||
var _ret0 logging.SimpleLogging
|
||||
if len(_result) != 0 {
|
||||
if _result[0] != nil {
|
||||
_ret0 = _result[0].(logging.SimpleLogging)
|
||||
}
|
||||
}
|
||||
return ret0
|
||||
return _ret0
|
||||
}
|
||||
|
||||
func (mock *MockSimpleLogging) VerifyWasCalledOnce() *VerifierMockSimpleLogging {
|
||||
@@ -192,11 +192,11 @@ type VerifierMockSimpleLogging struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) Debug(format string, a ...interface{}) *MockSimpleLogging_Debug_OngoingVerification {
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Debug", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Debug", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_Debug_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -211,18 +211,20 @@ func (c *MockSimpleLogging_Debug_OngoingVerification) GetCapturedArguments() (st
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_Debug_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param1[u][x-1] = params[x][u].(interface{})
|
||||
_param1[u] = make([]interface{}, len(_params)-1)
|
||||
for x := 1; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param1[u][x-1] = _params[x][u].(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,11 +233,11 @@ func (c *MockSimpleLogging_Debug_OngoingVerification) GetAllCapturedArguments()
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) Err(format string, a ...interface{}) *MockSimpleLogging_Err_OngoingVerification {
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Err", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Err", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_Err_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -250,18 +252,20 @@ func (c *MockSimpleLogging_Err_OngoingVerification) GetCapturedArguments() (stri
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_Err_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param1[u][x-1] = params[x][u].(interface{})
|
||||
_param1[u] = make([]interface{}, len(_params)-1)
|
||||
for x := 1; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param1[u][x-1] = _params[x][u].(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,8 +274,8 @@ func (c *MockSimpleLogging_Err_OngoingVerification) GetAllCapturedArguments() (_
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) Flush() *MockSimpleLogging_Flush_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Flush", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Flush", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_Flush_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -287,8 +291,8 @@ func (c *MockSimpleLogging_Flush_OngoingVerification) GetAllCapturedArguments()
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) GetHistory() *MockSimpleLogging_GetHistory_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetHistory", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "GetHistory", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_GetHistory_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -304,11 +308,11 @@ func (c *MockSimpleLogging_GetHistory_OngoingVerification) GetAllCapturedArgumen
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) Info(format string, a ...interface{}) *MockSimpleLogging_Info_OngoingVerification {
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Info", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Info", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_Info_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -323,18 +327,20 @@ func (c *MockSimpleLogging_Info_OngoingVerification) GetCapturedArguments() (str
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_Info_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param1[u][x-1] = params[x][u].(interface{})
|
||||
_param1[u] = make([]interface{}, len(_params)-1)
|
||||
for x := 1; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param1[u][x-1] = _params[x][u].(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,11 +349,11 @@ func (c *MockSimpleLogging_Info_OngoingVerification) GetAllCapturedArguments() (
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) Log(level logging.LogLevel, format string, a ...interface{}) *MockSimpleLogging_Log_OngoingVerification {
|
||||
params := []pegomock.Param{level, format}
|
||||
_params := []pegomock.Param{level, format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Log", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Log", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_Log_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -362,22 +368,26 @@ func (c *MockSimpleLogging_Log_OngoingVerification) GetCapturedArguments() (logg
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_Log_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.LogLevel, _param1 []string, _param2 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.LogLevel, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.LogLevel)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.LogLevel, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.LogLevel)
|
||||
}
|
||||
}
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
if len(_params) > 1 {
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param2 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param2[u] = make([]interface{}, len(params)-2)
|
||||
for x := 2; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param2[u][x-2] = params[x][u].(interface{})
|
||||
_param2[u] = make([]interface{}, len(_params)-2)
|
||||
for x := 2; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param2[u][x-2] = _params[x][u].(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -386,8 +396,8 @@ func (c *MockSimpleLogging_Log_OngoingVerification) GetAllCapturedArguments() (_
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) SetLevel(lvl logging.LogLevel) *MockSimpleLogging_SetLevel_OngoingVerification {
|
||||
params := []pegomock.Param{lvl}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetLevel", params, verifier.timeout)
|
||||
_params := []pegomock.Param{lvl}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetLevel", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_SetLevel_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -402,22 +412,24 @@ func (c *MockSimpleLogging_SetLevel_OngoingVerification) GetCapturedArguments()
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_SetLevel_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.LogLevel) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.LogLevel, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.LogLevel)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]logging.LogLevel, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(logging.LogLevel)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) Warn(format string, a ...interface{}) *MockSimpleLogging_Warn_OngoingVerification {
|
||||
params := []pegomock.Param{format}
|
||||
_params := []pegomock.Param{format}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Warn", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Warn", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_Warn_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -432,18 +444,20 @@ func (c *MockSimpleLogging_Warn_OngoingVerification) GetCapturedArguments() (str
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_Warn_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range _params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
}
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param1[u][x-1] = params[x][u].(interface{})
|
||||
_param1[u] = make([]interface{}, len(_params)-1)
|
||||
for x := 1; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param1[u][x-1] = _params[x][u].(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -452,11 +466,11 @@ func (c *MockSimpleLogging_Warn_OngoingVerification) GetAllCapturedArguments() (
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) With(a ...interface{}) *MockSimpleLogging_With_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
_params := []pegomock.Param{}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "With", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "With", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_With_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -471,14 +485,14 @@ func (c *MockSimpleLogging_With_OngoingVerification) GetCapturedArguments() []in
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_With_OngoingVerification) GetAllCapturedArguments() (_param0 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param0[u] = make([]interface{}, len(params)-0)
|
||||
for x := 0; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param0[u][x-0] = params[x][u].(interface{})
|
||||
_param0[u] = make([]interface{}, len(_params)-0)
|
||||
for x := 0; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param0[u][x-0] = _params[x][u].(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -487,11 +501,11 @@ func (c *MockSimpleLogging_With_OngoingVerification) GetAllCapturedArguments() (
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockSimpleLogging) WithHistory(a ...interface{}) *MockSimpleLogging_WithHistory_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
_params := []pegomock.Param{}
|
||||
for _, param := range a {
|
||||
params = append(params, param)
|
||||
_params = append(_params, param)
|
||||
}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "WithHistory", params, verifier.timeout)
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "WithHistory", _params, verifier.timeout)
|
||||
return &MockSimpleLogging_WithHistory_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
@@ -506,14 +520,14 @@ func (c *MockSimpleLogging_WithHistory_OngoingVerification) GetCapturedArguments
|
||||
}
|
||||
|
||||
func (c *MockSimpleLogging_WithHistory_OngoingVerification) GetAllCapturedArguments() (_param0 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(_params) > 0 {
|
||||
_param0 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param0[u] = make([]interface{}, len(params)-0)
|
||||
for x := 0; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
_param0[u][x-0] = params[x][u].(interface{})
|
||||
_param0[u] = make([]interface{}, len(_params)-0)
|
||||
for x := 0; x < len(_params); x++ {
|
||||
if _params[x][u] != nil {
|
||||
_param0[u][x-0] = _params[x][u].(interface{})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ func (mock *MockJob) Run() {
|
||||
if mock == nil {
|
||||
panic("mock must not be nil. Use myMock := NewMockJob().")
|
||||
}
|
||||
params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{})
|
||||
_params := []pegomock.Param{}
|
||||
pegomock.GetGenericMockFrom(mock).Invoke("Run", _params, []reflect.Type{})
|
||||
}
|
||||
|
||||
func (mock *MockJob) VerifyWasCalledOnce() *VerifierMockJob {
|
||||
@@ -70,8 +70,8 @@ type VerifierMockJob struct {
|
||||
}
|
||||
|
||||
func (verifier *VerifierMockJob) Run() *MockJob_Run_OngoingVerification {
|
||||
params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout)
|
||||
_params := []pegomock.Param{}
|
||||
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", _params, verifier.timeout)
|
||||
return &MockJob_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user