github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formation/automock/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  // Service is an autogenerated mock type for the Service type
    16  type Service struct {
    17  	mock.Mock
    18  }
    19  
    20  // AssignFormation provides a mock function with given fields: ctx, tnt, objectID, objectType, _a4
    21  func (_m *Service) AssignFormation(ctx context.Context, tnt string, objectID string, objectType graphql.FormationObjectType, _a4 model.Formation) (*model.Formation, error) {
    22  	ret := _m.Called(ctx, tnt, objectID, objectType, _a4)
    23  
    24  	var r0 *model.Formation
    25  	if rf, ok := ret.Get(0).(func(context.Context, string, string, graphql.FormationObjectType, model.Formation) *model.Formation); ok {
    26  		r0 = rf(ctx, tnt, objectID, objectType, _a4)
    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, string, graphql.FormationObjectType, model.Formation) error); ok {
    35  		r1 = rf(ctx, tnt, objectID, objectType, _a4)
    36  	} else {
    37  		r1 = ret.Error(1)
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  // CreateFormation provides a mock function with given fields: ctx, tnt, _a2, templateName
    44  func (_m *Service) CreateFormation(ctx context.Context, tnt string, _a2 model.Formation, templateName string) (*model.Formation, error) {
    45  	ret := _m.Called(ctx, tnt, _a2, templateName)
    46  
    47  	var r0 *model.Formation
    48  	if rf, ok := ret.Get(0).(func(context.Context, string, model.Formation, string) *model.Formation); ok {
    49  		r0 = rf(ctx, tnt, _a2, templateName)
    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, model.Formation, string) error); ok {
    58  		r1 = rf(ctx, tnt, _a2, templateName)
    59  	} else {
    60  		r1 = ret.Error(1)
    61  	}
    62  
    63  	return r0, r1
    64  }
    65  
    66  // DeleteFormation provides a mock function with given fields: ctx, tnt, _a2
    67  func (_m *Service) DeleteFormation(ctx context.Context, tnt string, _a2 model.Formation) (*model.Formation, error) {
    68  	ret := _m.Called(ctx, tnt, _a2)
    69  
    70  	var r0 *model.Formation
    71  	if rf, ok := ret.Get(0).(func(context.Context, string, model.Formation) *model.Formation); ok {
    72  		r0 = rf(ctx, tnt, _a2)
    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, model.Formation) error); ok {
    81  		r1 = rf(ctx, tnt, _a2)
    82  	} else {
    83  		r1 = ret.Error(1)
    84  	}
    85  
    86  	return r0, r1
    87  }
    88  
    89  // Get provides a mock function with given fields: ctx, id
    90  func (_m *Service) Get(ctx context.Context, id string) (*model.Formation, error) {
    91  	ret := _m.Called(ctx, id)
    92  
    93  	var r0 *model.Formation
    94  	if rf, ok := ret.Get(0).(func(context.Context, string) *model.Formation); ok {
    95  		r0 = rf(ctx, id)
    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) error); ok {
   104  		r1 = rf(ctx, id)
   105  	} else {
   106  		r1 = ret.Error(1)
   107  	}
   108  
   109  	return r0, r1
   110  }
   111  
   112  // GetFormationByName provides a mock function with given fields: ctx, formationName, tnt
   113  func (_m *Service) GetFormationByName(ctx context.Context, formationName string, tnt string) (*model.Formation, error) {
   114  	ret := _m.Called(ctx, formationName, tnt)
   115  
   116  	var r0 *model.Formation
   117  	if rf, ok := ret.Get(0).(func(context.Context, string, string) *model.Formation); ok {
   118  		r0 = rf(ctx, formationName, tnt)
   119  	} else {
   120  		if ret.Get(0) != nil {
   121  			r0 = ret.Get(0).(*model.Formation)
   122  		}
   123  	}
   124  
   125  	var r1 error
   126  	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
   127  		r1 = rf(ctx, formationName, tnt)
   128  	} else {
   129  		r1 = ret.Error(1)
   130  	}
   131  
   132  	return r0, r1
   133  }
   134  
   135  // List provides a mock function with given fields: ctx, pageSize, cursor
   136  func (_m *Service) List(ctx context.Context, pageSize int, cursor string) (*model.FormationPage, error) {
   137  	ret := _m.Called(ctx, pageSize, cursor)
   138  
   139  	var r0 *model.FormationPage
   140  	if rf, ok := ret.Get(0).(func(context.Context, int, string) *model.FormationPage); ok {
   141  		r0 = rf(ctx, pageSize, cursor)
   142  	} else {
   143  		if ret.Get(0) != nil {
   144  			r0 = ret.Get(0).(*model.FormationPage)
   145  		}
   146  	}
   147  
   148  	var r1 error
   149  	if rf, ok := ret.Get(1).(func(context.Context, int, string) error); ok {
   150  		r1 = rf(ctx, pageSize, cursor)
   151  	} else {
   152  		r1 = ret.Error(1)
   153  	}
   154  
   155  	return r0, r1
   156  }
   157  
   158  // ResynchronizeFormationNotifications provides a mock function with given fields: ctx, formationID
   159  func (_m *Service) ResynchronizeFormationNotifications(ctx context.Context, formationID string) (*model.Formation, error) {
   160  	ret := _m.Called(ctx, formationID)
   161  
   162  	var r0 *model.Formation
   163  	if rf, ok := ret.Get(0).(func(context.Context, string) *model.Formation); ok {
   164  		r0 = rf(ctx, formationID)
   165  	} else {
   166  		if ret.Get(0) != nil {
   167  			r0 = ret.Get(0).(*model.Formation)
   168  		}
   169  	}
   170  
   171  	var r1 error
   172  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
   173  		r1 = rf(ctx, formationID)
   174  	} else {
   175  		r1 = ret.Error(1)
   176  	}
   177  
   178  	return r0, r1
   179  }
   180  
   181  // UnassignFormation provides a mock function with given fields: ctx, tnt, objectID, objectType, _a4
   182  func (_m *Service) UnassignFormation(ctx context.Context, tnt string, objectID string, objectType graphql.FormationObjectType, _a4 model.Formation) (*model.Formation, error) {
   183  	ret := _m.Called(ctx, tnt, objectID, objectType, _a4)
   184  
   185  	var r0 *model.Formation
   186  	if rf, ok := ret.Get(0).(func(context.Context, string, string, graphql.FormationObjectType, model.Formation) *model.Formation); ok {
   187  		r0 = rf(ctx, tnt, objectID, objectType, _a4)
   188  	} else {
   189  		if ret.Get(0) != nil {
   190  			r0 = ret.Get(0).(*model.Formation)
   191  		}
   192  	}
   193  
   194  	var r1 error
   195  	if rf, ok := ret.Get(1).(func(context.Context, string, string, graphql.FormationObjectType, model.Formation) error); ok {
   196  		r1 = rf(ctx, tnt, objectID, objectType, _a4)
   197  	} else {
   198  		r1 = ret.Error(1)
   199  	}
   200  
   201  	return r0, r1
   202  }
   203  
   204  type mockConstructorTestingTNewService interface {
   205  	mock.TestingT
   206  	Cleanup(func())
   207  }
   208  
   209  // NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   210  func NewService(t mockConstructorTestingTNewService) *Service {
   211  	mock := &Service{}
   212  	mock.Mock.Test(t)
   213  
   214  	t.Cleanup(func() { mock.AssertExpectations(t) })
   215  
   216  	return mock
   217  }