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

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package automock
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	model "github.com/kyma-incubator/compass/components/director/internal/model"
    11  )
    12  
    13  // FormationService is an autogenerated mock type for the formationService type
    14  type FormationService struct {
    15  	mock.Mock
    16  }
    17  
    18  // CreateFormation provides a mock function with given fields: ctx, tnt, formation, templateName
    19  func (_m *FormationService) CreateFormation(ctx context.Context, tnt string, formation model.Formation, templateName string) (*model.Formation, error) {
    20  	ret := _m.Called(ctx, tnt, formation, templateName)
    21  
    22  	var r0 *model.Formation
    23  	if rf, ok := ret.Get(0).(func(context.Context, string, model.Formation, string) *model.Formation); ok {
    24  		r0 = rf(ctx, tnt, formation, templateName)
    25  	} else {
    26  		if ret.Get(0) != nil {
    27  			r0 = ret.Get(0).(*model.Formation)
    28  		}
    29  	}
    30  
    31  	var r1 error
    32  	if rf, ok := ret.Get(1).(func(context.Context, string, model.Formation, string) error); ok {
    33  		r1 = rf(ctx, tnt, formation, templateName)
    34  	} else {
    35  		r1 = ret.Error(1)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  // DeleteFormation provides a mock function with given fields: ctx, tnt, formation
    42  func (_m *FormationService) DeleteFormation(ctx context.Context, tnt string, formation model.Formation) (*model.Formation, error) {
    43  	ret := _m.Called(ctx, tnt, formation)
    44  
    45  	var r0 *model.Formation
    46  	if rf, ok := ret.Get(0).(func(context.Context, string, model.Formation) *model.Formation); ok {
    47  		r0 = rf(ctx, tnt, formation)
    48  	} else {
    49  		if ret.Get(0) != nil {
    50  			r0 = ret.Get(0).(*model.Formation)
    51  		}
    52  	}
    53  
    54  	var r1 error
    55  	if rf, ok := ret.Get(1).(func(context.Context, string, model.Formation) error); ok {
    56  		r1 = rf(ctx, tnt, formation)
    57  	} else {
    58  		r1 = ret.Error(1)
    59  	}
    60  
    61  	return r0, r1
    62  }
    63  
    64  type mockConstructorTestingTNewFormationService interface {
    65  	mock.TestingT
    66  	Cleanup(func())
    67  }
    68  
    69  // NewFormationService creates a new instance of FormationService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    70  func NewFormationService(t mockConstructorTestingTNewFormationService) *FormationService {
    71  	mock := &FormationService{}
    72  	mock.Mock.Test(t)
    73  
    74  	t.Cleanup(func() { mock.AssertExpectations(t) })
    75  
    76  	return mock
    77  }