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

     1  // Code generated by mockery v2.15.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  
    15  // CommonClient is an autogenerated mock type for the CommonClient type
    16  type CommonClient struct {
    17  	mock.Mock
    18  }
    19  
    20  // AddSecret provides a mock function with given fields: ctx, request
    21  func (_m *CommonClient) AddSecret(ctx context.Context, request common.SecretRequest) (common.BaseResponse, errors.EdgeX) {
    22  	ret := _m.Called(ctx, request)
    23  
    24  	var r0 common.BaseResponse
    25  	if rf, ok := ret.Get(0).(func(context.Context, common.SecretRequest) common.BaseResponse); ok {
    26  		r0 = rf(ctx, request)
    27  	} else {
    28  		r0 = ret.Get(0).(common.BaseResponse)
    29  	}
    30  
    31  	var r1 errors.EdgeX
    32  	if rf, ok := ret.Get(1).(func(context.Context, common.SecretRequest) errors.EdgeX); ok {
    33  		r1 = rf(ctx, request)
    34  	} else {
    35  		if ret.Get(1) != nil {
    36  			r1 = ret.Get(1).(errors.EdgeX)
    37  		}
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  // Configuration provides a mock function with given fields: ctx
    44  func (_m *CommonClient) Configuration(ctx context.Context) (common.ConfigResponse, errors.EdgeX) {
    45  	ret := _m.Called(ctx)
    46  
    47  	var r0 common.ConfigResponse
    48  	if rf, ok := ret.Get(0).(func(context.Context) common.ConfigResponse); ok {
    49  		r0 = rf(ctx)
    50  	} else {
    51  		r0 = ret.Get(0).(common.ConfigResponse)
    52  	}
    53  
    54  	var r1 errors.EdgeX
    55  	if rf, ok := ret.Get(1).(func(context.Context) errors.EdgeX); ok {
    56  		r1 = rf(ctx)
    57  	} else {
    58  		if ret.Get(1) != nil {
    59  			r1 = ret.Get(1).(errors.EdgeX)
    60  		}
    61  	}
    62  
    63  	return r0, r1
    64  }
    65  
    66  // Ping provides a mock function with given fields: ctx
    67  func (_m *CommonClient) Ping(ctx context.Context) (common.PingResponse, errors.EdgeX) {
    68  	ret := _m.Called(ctx)
    69  
    70  	var r0 common.PingResponse
    71  	if rf, ok := ret.Get(0).(func(context.Context) common.PingResponse); ok {
    72  		r0 = rf(ctx)
    73  	} else {
    74  		r0 = ret.Get(0).(common.PingResponse)
    75  	}
    76  
    77  	var r1 errors.EdgeX
    78  	if rf, ok := ret.Get(1).(func(context.Context) errors.EdgeX); ok {
    79  		r1 = rf(ctx)
    80  	} else {
    81  		if ret.Get(1) != nil {
    82  			r1 = ret.Get(1).(errors.EdgeX)
    83  		}
    84  	}
    85  
    86  	return r0, r1
    87  }
    88  
    89  // Version provides a mock function with given fields: ctx
    90  func (_m *CommonClient) Version(ctx context.Context) (common.VersionResponse, errors.EdgeX) {
    91  	ret := _m.Called(ctx)
    92  
    93  	var r0 common.VersionResponse
    94  	if rf, ok := ret.Get(0).(func(context.Context) common.VersionResponse); ok {
    95  		r0 = rf(ctx)
    96  	} else {
    97  		r0 = ret.Get(0).(common.VersionResponse)
    98  	}
    99  
   100  	var r1 errors.EdgeX
   101  	if rf, ok := ret.Get(1).(func(context.Context) errors.EdgeX); ok {
   102  		r1 = rf(ctx)
   103  	} else {
   104  		if ret.Get(1) != nil {
   105  			r1 = ret.Get(1).(errors.EdgeX)
   106  		}
   107  	}
   108  
   109  	return r0, r1
   110  }
   111  
   112  type mockConstructorTestingTNewCommonClient interface {
   113  	mock.TestingT
   114  	Cleanup(func())
   115  }
   116  
   117  // NewCommonClient creates a new instance of CommonClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   118  func NewCommonClient(t mockConstructorTestingTNewCommonClient) *CommonClient {
   119  	mock := &CommonClient{}
   120  	mock.Mock.Test(t)
   121  
   122  	t.Cleanup(func() { mock.AssertExpectations(t) })
   123  
   124  	return mock
   125  }