github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/pkg/jenkins/mocks/Task.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  	mock "github.com/stretchr/testify/mock"
     9  
    10  	time "time"
    11  )
    12  
    13  // Task is an autogenerated mock type for the Task type
    14  type Task struct {
    15  	mock.Mock
    16  }
    17  
    18  // BuildNumber provides a mock function with given fields:
    19  func (_m *Task) BuildNumber() (int64, error) {
    20  	ret := _m.Called()
    21  
    22  	var r0 int64
    23  	if rf, ok := ret.Get(0).(func() int64); ok {
    24  		r0 = rf()
    25  	} else {
    26  		r0 = ret.Get(0).(int64)
    27  	}
    28  
    29  	var r1 error
    30  	if rf, ok := ret.Get(1).(func() error); ok {
    31  		r1 = rf()
    32  	} else {
    33  		r1 = ret.Error(1)
    34  	}
    35  
    36  	return r0, r1
    37  }
    38  
    39  // HasStarted provides a mock function with given fields:
    40  func (_m *Task) HasStarted() bool {
    41  	ret := _m.Called()
    42  
    43  	var r0 bool
    44  	if rf, ok := ret.Get(0).(func() bool); ok {
    45  		r0 = rf()
    46  	} else {
    47  		r0 = ret.Get(0).(bool)
    48  	}
    49  
    50  	return r0
    51  }
    52  
    53  // Poll provides a mock function with given fields: _a0
    54  func (_m *Task) Poll(_a0 context.Context) (int, error) {
    55  	ret := _m.Called(_a0)
    56  
    57  	var r0 int
    58  	if rf, ok := ret.Get(0).(func(context.Context) int); ok {
    59  		r0 = rf(_a0)
    60  	} else {
    61  		r0 = ret.Get(0).(int)
    62  	}
    63  
    64  	var r1 error
    65  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
    66  		r1 = rf(_a0)
    67  	} else {
    68  		r1 = ret.Error(1)
    69  	}
    70  
    71  	return r0, r1
    72  }
    73  
    74  // WaitToStart provides a mock function with given fields: ctx, pollInterval
    75  func (_m *Task) WaitToStart(ctx context.Context, pollInterval time.Duration) (int64, error) {
    76  	ret := _m.Called(ctx, pollInterval)
    77  
    78  	var r0 int64
    79  	if rf, ok := ret.Get(0).(func(context.Context, time.Duration) int64); ok {
    80  		r0 = rf(ctx, pollInterval)
    81  	} else {
    82  		r0 = ret.Get(0).(int64)
    83  	}
    84  
    85  	var r1 error
    86  	if rf, ok := ret.Get(1).(func(context.Context, time.Duration) error); ok {
    87  		r1 = rf(ctx, pollInterval)
    88  	} else {
    89  		r1 = ret.Error(1)
    90  	}
    91  
    92  	return r0, r1
    93  }