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