Skip to content
Snippets Groups Projects
Commit 1c64becf authored by Fabian Seidl's avatar Fabian Seidl
Browse files

updated mocks to correct version

parent 9c788f97
No related branches found
No related tags found
3 merge requests!376Add additional example application hostname-checker,!343Add basic application framework and example application to show interaction between events an NBI,!342Resolve "Add an option to send gNMI Subscribe requests via SBI"
Pipeline #109983 failed
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
gnmi "github.com/openconfig/gnmi/proto/gnmi"
mock "github.com/stretchr/testify/mock"
transport "code.fbi.h-da.de/danet/gosdn/controller/interfaces/transport"
)
// HandleSubscribeResponse is an autogenerated mock type for the HandleSubscribeResponse type
type HandleSubscribeResponse struct {
mock.Mock
}
// Execute provides a mock function with given fields: _a0, _a1
func (_m *HandleSubscribeResponse) Execute(_a0 *gnmi.SubscribeResponse, _a1 *transport.SubscriptionInformation) {
_m.Called(_a0, _a1)
}
type mockConstructorTestingTNewHandleSubscribeResponse interface {
mock.TestingT
Cleanup(func())
}
// NewHandleSubscribeResponse creates a new instance of HandleSubscribeResponse. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewHandleSubscribeResponse(t mockConstructorTestingTNewHandleSubscribeResponse) *HandleSubscribeResponse {
mock := &HandleSubscribeResponse{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
......@@ -3,8 +3,8 @@
package mocks
import (
store "code.fbi.h-da.de/danet/gosdn/controller/interfaces/store"
uuid "github.com/google/uuid"
southbound "code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound"
store "code.fbi.h-da.de/danet/gosdn/controller/store"
mock "github.com/stretchr/testify/mock"
)
......@@ -13,13 +13,13 @@ type Store struct {
mock.Mock
}
// Add provides a mock function with given fields: item
func (_m *Store) Add(item store.Storable) error {
ret := _m.Called(item)
// Add provides a mock function with given fields: _a0
func (_m *Store) Add(_a0 southbound.SouthboundInterface) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(store.Storable) error); ok {
r0 = rf(item)
if rf, ok := ret.Get(0).(func(southbound.SouthboundInterface) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
......@@ -27,13 +27,13 @@ func (_m *Store) Add(item store.Storable) error {
return r0
}
// Delete provides a mock function with given fields: id
func (_m *Store) Delete(id uuid.UUID) error {
ret := _m.Called(id)
// Delete provides a mock function with given fields: _a0
func (_m *Store) Delete(_a0 southbound.SouthboundInterface) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(uuid.UUID) error); ok {
r0 = rf(id)
if rf, ok := ret.Get(0).(func(southbound.SouthboundInterface) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
......@@ -41,36 +41,20 @@ func (_m *Store) Delete(id uuid.UUID) error {
return r0
}
// Exists provides a mock function with given fields: id
func (_m *Store) Exists(id uuid.UUID) bool {
ret := _m.Called(id)
// Get provides a mock function with given fields: _a0
func (_m *Store) Get(_a0 store.Query) (southbound.LoadedSbi, error) {
ret := _m.Called(_a0)
var r0 bool
if rf, ok := ret.Get(0).(func(uuid.UUID) bool); ok {
r0 = rf(id)
var r0 southbound.LoadedSbi
if rf, ok := ret.Get(0).(func(store.Query) southbound.LoadedSbi); ok {
r0 = rf(_a0)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// Get provides a mock function with given fields: id
func (_m *Store) Get(id uuid.UUID) (store.Storable, error) {
ret := _m.Called(id)
var r0 store.Storable
if rf, ok := ret.Get(0).(func(uuid.UUID) store.Storable); ok {
r0 = rf(id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(store.Storable)
}
r0 = ret.Get(0).(southbound.LoadedSbi)
}
var r1 error
if rf, ok := ret.Get(1).(func(uuid.UUID) error); ok {
r1 = rf(id)
if rf, ok := ret.Get(1).(func(store.Query) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
......@@ -78,20 +62,27 @@ func (_m *Store) Get(id uuid.UUID) (store.Storable, error) {
return r0, r1
}
// UUIDs provides a mock function with given fields:
func (_m *Store) UUIDs() []uuid.UUID {
// GetAll provides a mock function with given fields:
func (_m *Store) GetAll() ([]southbound.LoadedSbi, error) {
ret := _m.Called()
var r0 []uuid.UUID
if rf, ok := ret.Get(0).(func() []uuid.UUID); ok {
var r0 []southbound.LoadedSbi
if rf, ok := ret.Get(0).(func() []southbound.LoadedSbi); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]uuid.UUID)
r0 = ret.Get(0).([]southbound.LoadedSbi)
}
}
return r0
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewStore interface {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment