github.com/argoproj/argo-cd/v2@v2.10.9/server/application/mocks/Broadcaster.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	v1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // Broadcaster is an autogenerated mock type for the Broadcaster type
    11  type Broadcaster struct {
    12  	mock.Mock
    13  }
    14  
    15  // OnAdd provides a mock function with given fields: _a0
    16  func (_m *Broadcaster) OnAdd(_a0 interface{}) {
    17  	_m.Called(_a0)
    18  }
    19  
    20  // OnDelete provides a mock function with given fields: _a0
    21  func (_m *Broadcaster) OnDelete(_a0 interface{}) {
    22  	_m.Called(_a0)
    23  }
    24  
    25  // OnUpdate provides a mock function with given fields: _a0, _a1
    26  func (_m *Broadcaster) OnUpdate(_a0 interface{}, _a1 interface{}) {
    27  	_m.Called(_a0, _a1)
    28  }
    29  
    30  // Subscribe provides a mock function with given fields: ch, filters
    31  func (_m *Broadcaster) Subscribe(ch chan *v1alpha1.ApplicationWatchEvent, filters ...func(*v1alpha1.ApplicationWatchEvent) bool) func() {
    32  	_va := make([]interface{}, len(filters))
    33  	for _i := range filters {
    34  		_va[_i] = filters[_i]
    35  	}
    36  	var _ca []interface{}
    37  	_ca = append(_ca, ch)
    38  	_ca = append(_ca, _va...)
    39  	ret := _m.Called(_ca...)
    40  
    41  	var r0 func()
    42  	if rf, ok := ret.Get(0).(func(chan *v1alpha1.ApplicationWatchEvent, ...func(*v1alpha1.ApplicationWatchEvent) bool) func()); ok {
    43  		r0 = rf(ch, filters...)
    44  	} else {
    45  		if ret.Get(0) != nil {
    46  			r0 = ret.Get(0).(func())
    47  		}
    48  	}
    49  
    50  	return r0
    51  }
    52  
    53  type mockConstructorTestingTNewBroadcaster interface {
    54  	mock.TestingT
    55  	Cleanup(func())
    56  }
    57  
    58  // NewBroadcaster creates a new instance of Broadcaster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    59  func NewBroadcaster(t mockConstructorTestingTNewBroadcaster) *Broadcaster {
    60  	mock := &Broadcaster{}
    61  	mock.Mock.Test(t)
    62  
    63  	t.Cleanup(func() { mock.AssertExpectations(t) })
    64  
    65  	return mock
    66  }