github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/webhook/automock/webhook_service.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	model "github.com/kyma-incubator/compass/components/director/internal/model"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // WebhookService is an autogenerated mock type for the WebhookService type
    13  type WebhookService struct {
    14  	mock.Mock
    15  }
    16  
    17  // Create provides a mock function with given fields: ctx, resourceID, in, objectType
    18  func (_m *WebhookService) Create(ctx context.Context, resourceID string, in model.WebhookInput, objectType model.WebhookReferenceObjectType) (string, error) {
    19  	ret := _m.Called(ctx, resourceID, in, objectType)
    20  
    21  	var r0 string
    22  	if rf, ok := ret.Get(0).(func(context.Context, string, model.WebhookInput, model.WebhookReferenceObjectType) string); ok {
    23  		r0 = rf(ctx, resourceID, in, objectType)
    24  	} else {
    25  		r0 = ret.Get(0).(string)
    26  	}
    27  
    28  	var r1 error
    29  	if rf, ok := ret.Get(1).(func(context.Context, string, model.WebhookInput, model.WebhookReferenceObjectType) error); ok {
    30  		r1 = rf(ctx, resourceID, in, objectType)
    31  	} else {
    32  		r1 = ret.Error(1)
    33  	}
    34  
    35  	return r0, r1
    36  }
    37  
    38  // Delete provides a mock function with given fields: ctx, id, objectType
    39  func (_m *WebhookService) Delete(ctx context.Context, id string, objectType model.WebhookReferenceObjectType) error {
    40  	ret := _m.Called(ctx, id, objectType)
    41  
    42  	var r0 error
    43  	if rf, ok := ret.Get(0).(func(context.Context, string, model.WebhookReferenceObjectType) error); ok {
    44  		r0 = rf(ctx, id, objectType)
    45  	} else {
    46  		r0 = ret.Error(0)
    47  	}
    48  
    49  	return r0
    50  }
    51  
    52  // Get provides a mock function with given fields: ctx, id, objectType
    53  func (_m *WebhookService) Get(ctx context.Context, id string, objectType model.WebhookReferenceObjectType) (*model.Webhook, error) {
    54  	ret := _m.Called(ctx, id, objectType)
    55  
    56  	var r0 *model.Webhook
    57  	if rf, ok := ret.Get(0).(func(context.Context, string, model.WebhookReferenceObjectType) *model.Webhook); ok {
    58  		r0 = rf(ctx, id, objectType)
    59  	} else {
    60  		if ret.Get(0) != nil {
    61  			r0 = ret.Get(0).(*model.Webhook)
    62  		}
    63  	}
    64  
    65  	var r1 error
    66  	if rf, ok := ret.Get(1).(func(context.Context, string, model.WebhookReferenceObjectType) error); ok {
    67  		r1 = rf(ctx, id, objectType)
    68  	} else {
    69  		r1 = ret.Error(1)
    70  	}
    71  
    72  	return r0, r1
    73  }
    74  
    75  // ListAllApplicationWebhooks provides a mock function with given fields: ctx, applicationID
    76  func (_m *WebhookService) ListAllApplicationWebhooks(ctx context.Context, applicationID string) ([]*model.Webhook, error) {
    77  	ret := _m.Called(ctx, applicationID)
    78  
    79  	var r0 []*model.Webhook
    80  	if rf, ok := ret.Get(0).(func(context.Context, string) []*model.Webhook); ok {
    81  		r0 = rf(ctx, applicationID)
    82  	} else {
    83  		if ret.Get(0) != nil {
    84  			r0 = ret.Get(0).([]*model.Webhook)
    85  		}
    86  	}
    87  
    88  	var r1 error
    89  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    90  		r1 = rf(ctx, applicationID)
    91  	} else {
    92  		r1 = ret.Error(1)
    93  	}
    94  
    95  	return r0, r1
    96  }
    97  
    98  // ListForRuntime provides a mock function with given fields: ctx, runtimeID
    99  func (_m *WebhookService) ListForRuntime(ctx context.Context, runtimeID string) ([]*model.Webhook, error) {
   100  	ret := _m.Called(ctx, runtimeID)
   101  
   102  	var r0 []*model.Webhook
   103  	if rf, ok := ret.Get(0).(func(context.Context, string) []*model.Webhook); ok {
   104  		r0 = rf(ctx, runtimeID)
   105  	} else {
   106  		if ret.Get(0) != nil {
   107  			r0 = ret.Get(0).([]*model.Webhook)
   108  		}
   109  	}
   110  
   111  	var r1 error
   112  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
   113  		r1 = rf(ctx, runtimeID)
   114  	} else {
   115  		r1 = ret.Error(1)
   116  	}
   117  
   118  	return r0, r1
   119  }
   120  
   121  // Update provides a mock function with given fields: ctx, id, in, objectType
   122  func (_m *WebhookService) Update(ctx context.Context, id string, in model.WebhookInput, objectType model.WebhookReferenceObjectType) error {
   123  	ret := _m.Called(ctx, id, in, objectType)
   124  
   125  	var r0 error
   126  	if rf, ok := ret.Get(0).(func(context.Context, string, model.WebhookInput, model.WebhookReferenceObjectType) error); ok {
   127  		r0 = rf(ctx, id, in, objectType)
   128  	} else {
   129  		r0 = ret.Error(0)
   130  	}
   131  
   132  	return r0
   133  }
   134  
   135  type mockConstructorTestingTNewWebhookService interface {
   136  	mock.TestingT
   137  	Cleanup(func())
   138  }
   139  
   140  // NewWebhookService creates a new instance of WebhookService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   141  func NewWebhookService(t mockConstructorTestingTNewWebhookService) *WebhookService {
   142  	mock := &WebhookService{}
   143  	mock.Mock.Test(t)
   144  
   145  	t.Cleanup(func() { mock.AssertExpectations(t) })
   146  
   147  	return mock
   148  }