github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/pkg/jenkins/mocks/Build.go (about)

     1  // Code generated by mockery v2.7.5. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	gojenkins "github.com/bndr/gojenkins"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // Build is an autogenerated mock type for the Build type
    14  type Build struct {
    15  	mock.Mock
    16  }
    17  
    18  // GetArtifacts provides a mock function with given fields:
    19  func (_m *Build) GetArtifacts() []gojenkins.Artifact {
    20  	ret := _m.Called()
    21  
    22  	var r0 []gojenkins.Artifact
    23  	if rf, ok := ret.Get(0).(func() []gojenkins.Artifact); ok {
    24  		r0 = rf()
    25  	} else {
    26  		if ret.Get(0) != nil {
    27  			r0 = ret.Get(0).([]gojenkins.Artifact)
    28  		}
    29  	}
    30  
    31  	return r0
    32  }
    33  
    34  // IsRunning provides a mock function with given fields: ctx
    35  func (_m *Build) IsRunning(ctx context.Context) bool {
    36  	ret := _m.Called(ctx)
    37  
    38  	var r0 bool
    39  	if rf, ok := ret.Get(0).(func(context.Context) bool); ok {
    40  		r0 = rf(ctx)
    41  	} else {
    42  		r0 = ret.Get(0).(bool)
    43  	}
    44  
    45  	return r0
    46  }
    47  
    48  // Poll provides a mock function with given fields: ctx, options
    49  func (_m *Build) Poll(ctx context.Context, options ...interface{}) (int, error) {
    50  	var _ca []interface{}
    51  	_ca = append(_ca, ctx)
    52  	_ca = append(_ca, options...)
    53  	ret := _m.Called(_ca...)
    54  
    55  	var r0 int
    56  	if rf, ok := ret.Get(0).(func(context.Context, ...interface{}) int); ok {
    57  		r0 = rf(ctx, options...)
    58  	} else {
    59  		r0 = ret.Get(0).(int)
    60  	}
    61  
    62  	var r1 error
    63  	if rf, ok := ret.Get(1).(func(context.Context, ...interface{}) error); ok {
    64  		r1 = rf(ctx, options...)
    65  	} else {
    66  		r1 = ret.Error(1)
    67  	}
    68  
    69  	return r0, r1
    70  }