github.com/yandex/pandora@v0.5.32/lib/netutil/mocks/dns_cache.go (about)

     1  // Code generated by mockery v2.20.2. DO NOT EDIT.
     2  
     3  package netmock
     4  
     5  import mock "github.com/stretchr/testify/mock"
     6  
     7  // DNSCache is an autogenerated mock type for the DNSCache type
     8  type DNSCache struct {
     9  	mock.Mock
    10  }
    11  
    12  // Add provides a mock function with given fields: addr, resolved
    13  func (_m *DNSCache) Add(addr string, resolved string) {
    14  	_m.Called(addr, resolved)
    15  }
    16  
    17  // Get provides a mock function with given fields: addr
    18  func (_m *DNSCache) Get(addr string) (string, bool) {
    19  	ret := _m.Called(addr)
    20  
    21  	var r0 string
    22  	var r1 bool
    23  	if rf, ok := ret.Get(0).(func(string) (string, bool)); ok {
    24  		return rf(addr)
    25  	}
    26  	if rf, ok := ret.Get(0).(func(string) string); ok {
    27  		r0 = rf(addr)
    28  	} else {
    29  		r0 = ret.Get(0).(string)
    30  	}
    31  
    32  	if rf, ok := ret.Get(1).(func(string) bool); ok {
    33  		r1 = rf(addr)
    34  	} else {
    35  		r1 = ret.Get(1).(bool)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  type mockConstructorTestingTNewDNSCache interface {
    42  	mock.TestingT
    43  	Cleanup(func())
    44  }
    45  
    46  // NewDNSCache creates a new instance of DNSCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    47  func NewDNSCache(t mockConstructorTestingTNewDNSCache) *DNSCache {
    48  	mock := &DNSCache{}
    49  	mock.Mock.Test(t)
    50  
    51  	t.Cleanup(func() { mock.AssertExpectations(t) })
    52  
    53  	return mock
    54  }