dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/clients/interfaces/mocks/CommandClient.go (about)

     1  // Code generated by mockery v2.14.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	common "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/common"
     9  
    10  	errors "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/errors"
    11  
    12  	mock "github.com/stretchr/testify/mock"
    13  
    14  	responses "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/responses"
    15  )
    16  
    17  // CommandClient is an autogenerated mock type for the CommandClient type
    18  type CommandClient struct {
    19  	mock.Mock
    20  }
    21  
    22  // AllDeviceCoreCommands provides a mock function with given fields: ctx, offset, limit
    23  func (_m *CommandClient) AllDeviceCoreCommands(ctx context.Context, offset int, limit int) (responses.MultiDeviceCoreCommandsResponse, errors.EdgeX) {
    24  	ret := _m.Called(ctx, offset, limit)
    25  
    26  	var r0 responses.MultiDeviceCoreCommandsResponse
    27  	if rf, ok := ret.Get(0).(func(context.Context, int, int) responses.MultiDeviceCoreCommandsResponse); ok {
    28  		r0 = rf(ctx, offset, limit)
    29  	} else {
    30  		r0 = ret.Get(0).(responses.MultiDeviceCoreCommandsResponse)
    31  	}
    32  
    33  	var r1 errors.EdgeX
    34  	if rf, ok := ret.Get(1).(func(context.Context, int, int) errors.EdgeX); ok {
    35  		r1 = rf(ctx, offset, limit)
    36  	} else {
    37  		if ret.Get(1) != nil {
    38  			r1 = ret.Get(1).(errors.EdgeX)
    39  		}
    40  	}
    41  
    42  	return r0, r1
    43  }
    44  
    45  // DeviceCoreCommandsByDeviceName provides a mock function with given fields: ctx, deviceName
    46  func (_m *CommandClient) DeviceCoreCommandsByDeviceName(ctx context.Context, deviceName string) (responses.DeviceCoreCommandResponse, errors.EdgeX) {
    47  	ret := _m.Called(ctx, deviceName)
    48  
    49  	var r0 responses.DeviceCoreCommandResponse
    50  	if rf, ok := ret.Get(0).(func(context.Context, string) responses.DeviceCoreCommandResponse); ok {
    51  		r0 = rf(ctx, deviceName)
    52  	} else {
    53  		r0 = ret.Get(0).(responses.DeviceCoreCommandResponse)
    54  	}
    55  
    56  	var r1 errors.EdgeX
    57  	if rf, ok := ret.Get(1).(func(context.Context, string) errors.EdgeX); ok {
    58  		r1 = rf(ctx, deviceName)
    59  	} else {
    60  		if ret.Get(1) != nil {
    61  			r1 = ret.Get(1).(errors.EdgeX)
    62  		}
    63  	}
    64  
    65  	return r0, r1
    66  }
    67  
    68  // IssueGetCommandByName provides a mock function with given fields: ctx, deviceName, commandName, dsPushEvent, dsReturnEvent
    69  func (_m *CommandClient) IssueGetCommandByName(ctx context.Context, deviceName string, commandName string, dsPushEvent bool, dsReturnEvent bool) (*responses.EventResponse, errors.EdgeX) {
    70  	ret := _m.Called(ctx, deviceName, commandName, dsPushEvent, dsReturnEvent)
    71  
    72  	var r0 *responses.EventResponse
    73  	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool, bool) *responses.EventResponse); ok {
    74  		r0 = rf(ctx, deviceName, commandName, dsPushEvent, dsReturnEvent)
    75  	} else {
    76  		if ret.Get(0) != nil {
    77  			r0 = ret.Get(0).(*responses.EventResponse)
    78  		}
    79  	}
    80  
    81  	var r1 errors.EdgeX
    82  	if rf, ok := ret.Get(1).(func(context.Context, string, string, bool, bool) errors.EdgeX); ok {
    83  		r1 = rf(ctx, deviceName, commandName, dsPushEvent, dsReturnEvent)
    84  	} else {
    85  		if ret.Get(1) != nil {
    86  			r1 = ret.Get(1).(errors.EdgeX)
    87  		}
    88  	}
    89  
    90  	return r0, r1
    91  }
    92  
    93  // IssueGetCommandByNameWithQueryParams provides a mock function with given fields: ctx, deviceName, commandName, queryParams
    94  func (_m *CommandClient) IssueGetCommandByNameWithQueryParams(ctx context.Context, deviceName string, commandName string, queryParams map[string]string) (*responses.EventResponse, errors.EdgeX) {
    95  	ret := _m.Called(ctx, deviceName, commandName, queryParams)
    96  
    97  	var r0 *responses.EventResponse
    98  	if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) *responses.EventResponse); ok {
    99  		r0 = rf(ctx, deviceName, commandName, queryParams)
   100  	} else {
   101  		if ret.Get(0) != nil {
   102  			r0 = ret.Get(0).(*responses.EventResponse)
   103  		}
   104  	}
   105  
   106  	var r1 errors.EdgeX
   107  	if rf, ok := ret.Get(1).(func(context.Context, string, string, map[string]string) errors.EdgeX); ok {
   108  		r1 = rf(ctx, deviceName, commandName, queryParams)
   109  	} else {
   110  		if ret.Get(1) != nil {
   111  			r1 = ret.Get(1).(errors.EdgeX)
   112  		}
   113  	}
   114  
   115  	return r0, r1
   116  }
   117  
   118  // IssueSetCommandByName provides a mock function with given fields: ctx, deviceName, commandName, settings
   119  func (_m *CommandClient) IssueSetCommandByName(ctx context.Context, deviceName string, commandName string, settings map[string]string) (common.BaseResponse, errors.EdgeX) {
   120  	ret := _m.Called(ctx, deviceName, commandName, settings)
   121  
   122  	var r0 common.BaseResponse
   123  	if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) common.BaseResponse); ok {
   124  		r0 = rf(ctx, deviceName, commandName, settings)
   125  	} else {
   126  		r0 = ret.Get(0).(common.BaseResponse)
   127  	}
   128  
   129  	var r1 errors.EdgeX
   130  	if rf, ok := ret.Get(1).(func(context.Context, string, string, map[string]string) errors.EdgeX); ok {
   131  		r1 = rf(ctx, deviceName, commandName, settings)
   132  	} else {
   133  		if ret.Get(1) != nil {
   134  			r1 = ret.Get(1).(errors.EdgeX)
   135  		}
   136  	}
   137  
   138  	return r0, r1
   139  }
   140  
   141  // IssueSetCommandByNameWithObject provides a mock function with given fields: ctx, deviceName, commandName, settings
   142  func (_m *CommandClient) IssueSetCommandByNameWithObject(ctx context.Context, deviceName string, commandName string, settings map[string]interface{}) (common.BaseResponse, errors.EdgeX) {
   143  	ret := _m.Called(ctx, deviceName, commandName, settings)
   144  
   145  	var r0 common.BaseResponse
   146  	if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string]interface{}) common.BaseResponse); ok {
   147  		r0 = rf(ctx, deviceName, commandName, settings)
   148  	} else {
   149  		r0 = ret.Get(0).(common.BaseResponse)
   150  	}
   151  
   152  	var r1 errors.EdgeX
   153  	if rf, ok := ret.Get(1).(func(context.Context, string, string, map[string]interface{}) errors.EdgeX); ok {
   154  		r1 = rf(ctx, deviceName, commandName, settings)
   155  	} else {
   156  		if ret.Get(1) != nil {
   157  			r1 = ret.Get(1).(errors.EdgeX)
   158  		}
   159  	}
   160  
   161  	return r0, r1
   162  }
   163  
   164  type mockConstructorTestingTNewCommandClient interface {
   165  	mock.TestingT
   166  	Cleanup(func())
   167  }
   168  
   169  // NewCommandClient creates a new instance of CommandClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   170  func NewCommandClient(t mockConstructorTestingTNewCommandClient) *CommandClient {
   171  	mock := &CommandClient{}
   172  	mock.Mock.Test(t)
   173  
   174  	t.Cleanup(func() { mock.AssertExpectations(t) })
   175  
   176  	return mock
   177  }