github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/runtime/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  	graphql "github.com/kyma-incubator/compass/components/director/pkg/graphql"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	model "github.com/kyma-incubator/compass/components/director/internal/model"
    12  )
    13  
    14  // FormationService is an autogenerated mock type for the formationService type
    15  type FormationService struct {
    16  	mock.Mock
    17  }
    18  
    19  // AssignFormation provides a mock function with given fields: ctx, tnt, objectID, objectType, formation
    20  func (_m *FormationService) AssignFormation(ctx context.Context, tnt string, objectID string, objectType graphql.FormationObjectType, formation model.Formation) (*model.Formation, error) {
    21  	ret := _m.Called(ctx, tnt, objectID, objectType, formation)
    22  
    23  	var r0 *model.Formation
    24  	if rf, ok := ret.Get(0).(func(context.Context, string, string, graphql.FormationObjectType, model.Formation) *model.Formation); ok {
    25  		r0 = rf(ctx, tnt, objectID, objectType, formation)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(*model.Formation)
    29  		}
    30  	}
    31  
    32  	var r1 error
    33  	if rf, ok := ret.Get(1).(func(context.Context, string, string, graphql.FormationObjectType, model.Formation) error); ok {
    34  		r1 = rf(ctx, tnt, objectID, objectType, formation)
    35  	} else {
    36  		r1 = ret.Error(1)
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  // DeleteAutomaticScenarioAssignment provides a mock function with given fields: ctx, in
    43  func (_m *FormationService) DeleteAutomaticScenarioAssignment(ctx context.Context, in model.AutomaticScenarioAssignment) error {
    44  	ret := _m.Called(ctx, in)
    45  
    46  	var r0 error
    47  	if rf, ok := ret.Get(0).(func(context.Context, model.AutomaticScenarioAssignment) error); ok {
    48  		r0 = rf(ctx, in)
    49  	} else {
    50  		r0 = ret.Error(0)
    51  	}
    52  
    53  	return r0
    54  }
    55  
    56  // MergeScenariosFromInputLabelsAndAssignments provides a mock function with given fields: ctx, inputLabels, runtimeID
    57  func (_m *FormationService) MergeScenariosFromInputLabelsAndAssignments(ctx context.Context, inputLabels map[string]interface{}, runtimeID string) ([]interface{}, error) {
    58  	ret := _m.Called(ctx, inputLabels, runtimeID)
    59  
    60  	var r0 []interface{}
    61  	if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}, string) []interface{}); ok {
    62  		r0 = rf(ctx, inputLabels, runtimeID)
    63  	} else {
    64  		if ret.Get(0) != nil {
    65  			r0 = ret.Get(0).([]interface{})
    66  		}
    67  	}
    68  
    69  	var r1 error
    70  	if rf, ok := ret.Get(1).(func(context.Context, map[string]interface{}, string) error); ok {
    71  		r1 = rf(ctx, inputLabels, runtimeID)
    72  	} else {
    73  		r1 = ret.Error(1)
    74  	}
    75  
    76  	return r0, r1
    77  }
    78  
    79  // UnassignFormation provides a mock function with given fields: ctx, tnt, objectID, objectType, formation
    80  func (_m *FormationService) UnassignFormation(ctx context.Context, tnt string, objectID string, objectType graphql.FormationObjectType, formation model.Formation) (*model.Formation, error) {
    81  	ret := _m.Called(ctx, tnt, objectID, objectType, formation)
    82  
    83  	var r0 *model.Formation
    84  	if rf, ok := ret.Get(0).(func(context.Context, string, string, graphql.FormationObjectType, model.Formation) *model.Formation); ok {
    85  		r0 = rf(ctx, tnt, objectID, objectType, formation)
    86  	} else {
    87  		if ret.Get(0) != nil {
    88  			r0 = ret.Get(0).(*model.Formation)
    89  		}
    90  	}
    91  
    92  	var r1 error
    93  	if rf, ok := ret.Get(1).(func(context.Context, string, string, graphql.FormationObjectType, model.Formation) error); ok {
    94  		r1 = rf(ctx, tnt, objectID, objectType, formation)
    95  	} else {
    96  		r1 = ret.Error(1)
    97  	}
    98  
    99  	return r0, r1
   100  }
   101  
   102  type mockConstructorTestingTNewFormationService interface {
   103  	mock.TestingT
   104  	Cleanup(func())
   105  }
   106  
   107  // 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.
   108  func NewFormationService(t mockConstructorTestingTNewFormationService) *FormationService {
   109  	mock := &FormationService{}
   110  	mock.Mock.Test(t)
   111  
   112  	t.Cleanup(func() { mock.AssertExpectations(t) })
   113  
   114  	return mock
   115  }