github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/subscription/automock/application_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  // ApplicationService is an autogenerated mock type for the ApplicationService type
    13  type ApplicationService struct {
    14  	mock.Mock
    15  }
    16  
    17  // CreateFromTemplate provides a mock function with given fields: ctx, in, appTemplateID
    18  func (_m *ApplicationService) CreateFromTemplate(ctx context.Context, in model.ApplicationRegisterInput, appTemplateID *string) (string, error) {
    19  	ret := _m.Called(ctx, in, appTemplateID)
    20  
    21  	var r0 string
    22  	if rf, ok := ret.Get(0).(func(context.Context, model.ApplicationRegisterInput, *string) string); ok {
    23  		r0 = rf(ctx, in, appTemplateID)
    24  	} else {
    25  		r0 = ret.Get(0).(string)
    26  	}
    27  
    28  	var r1 error
    29  	if rf, ok := ret.Get(1).(func(context.Context, model.ApplicationRegisterInput, *string) error); ok {
    30  		r1 = rf(ctx, in, appTemplateID)
    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
    39  func (_m *ApplicationService) Delete(ctx context.Context, id string) error {
    40  	ret := _m.Called(ctx, id)
    41  
    42  	var r0 error
    43  	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
    44  		r0 = rf(ctx, id)
    45  	} else {
    46  		r0 = ret.Error(0)
    47  	}
    48  
    49  	return r0
    50  }
    51  
    52  // ListAll provides a mock function with given fields: ctx
    53  func (_m *ApplicationService) ListAll(ctx context.Context) ([]*model.Application, error) {
    54  	ret := _m.Called(ctx)
    55  
    56  	var r0 []*model.Application
    57  	if rf, ok := ret.Get(0).(func(context.Context) []*model.Application); ok {
    58  		r0 = rf(ctx)
    59  	} else {
    60  		if ret.Get(0) != nil {
    61  			r0 = ret.Get(0).([]*model.Application)
    62  		}
    63  	}
    64  
    65  	var r1 error
    66  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
    67  		r1 = rf(ctx)
    68  	} else {
    69  		r1 = ret.Error(1)
    70  	}
    71  
    72  	return r0, r1
    73  }
    74  
    75  type mockConstructorTestingTNewApplicationService interface {
    76  	mock.TestingT
    77  	Cleanup(func())
    78  }
    79  
    80  // NewApplicationService creates a new instance of ApplicationService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    81  func NewApplicationService(t mockConstructorTestingTNewApplicationService) *ApplicationService {
    82  	mock := &ApplicationService{}
    83  	mock.Mock.Test(t)
    84  
    85  	t.Cleanup(func() { mock.AssertExpectations(t) })
    86  
    87  	return mock
    88  }