github.com/yandex/pandora@v0.5.32/components/providers/http/decoders/mock_decoder.go (about)

     1  // Code generated by mockery v2.22.1. DO NOT EDIT.
     2  
     3  package decoders
     4  
     5  import (
     6  	context "context"
     7  
     8  	core "github.com/yandex/pandora/core"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // MockDecoder is an autogenerated mock type for the Decoder type
    13  type MockDecoder struct {
    14  	mock.Mock
    15  }
    16  
    17  // LoadAmmo provides a mock function with given fields: _a0
    18  func (_m *MockDecoder) LoadAmmo(_a0 context.Context) ([]DecodedAmmo, error) {
    19  	ret := _m.Called(_a0)
    20  
    21  	var r0 []DecodedAmmo
    22  	var r1 error
    23  	if rf, ok := ret.Get(0).(func(context.Context) ([]DecodedAmmo, error)); ok {
    24  		return rf(_a0)
    25  	}
    26  	if rf, ok := ret.Get(0).(func(context.Context) []DecodedAmmo); ok {
    27  		r0 = rf(_a0)
    28  	} else {
    29  		if ret.Get(0) != nil {
    30  			r0 = ret.Get(0).([]DecodedAmmo)
    31  		}
    32  	}
    33  
    34  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
    35  		r1 = rf(_a0)
    36  	} else {
    37  		r1 = ret.Error(1)
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  // Release provides a mock function with given fields: a
    44  func (_m *MockDecoder) Release(a core.Ammo) {
    45  	_m.Called(a)
    46  }
    47  
    48  // Scan provides a mock function with given fields: _a0
    49  func (_m *MockDecoder) Scan(_a0 context.Context) (DecodedAmmo, error) {
    50  	ret := _m.Called(_a0)
    51  
    52  	var r0 DecodedAmmo
    53  	var r1 error
    54  	if rf, ok := ret.Get(0).(func(context.Context) (DecodedAmmo, error)); ok {
    55  		return rf(_a0)
    56  	}
    57  	if rf, ok := ret.Get(0).(func(context.Context) DecodedAmmo); ok {
    58  		r0 = rf(_a0)
    59  	} else {
    60  		if ret.Get(0) != nil {
    61  			r0 = ret.Get(0).(DecodedAmmo)
    62  		}
    63  	}
    64  
    65  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
    66  		r1 = rf(_a0)
    67  	} else {
    68  		r1 = ret.Error(1)
    69  	}
    70  
    71  	return r0, r1
    72  }
    73  
    74  type mockConstructorTestingTNewMockDecoder interface {
    75  	mock.TestingT
    76  	Cleanup(func())
    77  }
    78  
    79  // NewMockDecoder creates a new instance of MockDecoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    80  func NewMockDecoder(t mockConstructorTestingTNewMockDecoder) *MockDecoder {
    81  	mock := &MockDecoder{}
    82  	mock.Mock.Test(t)
    83  
    84  	t.Cleanup(func() { mock.AssertExpectations(t) })
    85  
    86  	return mock
    87  }