2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
23 "github.com/stretchr/testify/mock"
26 type RmrMessengerMock struct {
30 func (m *RmrMessengerMock) Init(port string, maxMsgSize int, flags int, logger *logger.Logger) rmrCgo.RmrMessenger{
31 args := m.Called(port, maxMsgSize, flags, logger)
32 return args.Get(0).(rmrCgo.RmrMessenger)
35 func (m *RmrMessengerMock) SendMsg(msg *rmrCgo.MBuf) (*rmrCgo.MBuf, error){
37 return args.Get(0).(*rmrCgo.MBuf), args.Error(1)
40 func (m *RmrMessengerMock) RecvMsg() (*rmrCgo.MBuf, error){
42 return args.Get(0).(*rmrCgo.MBuf), args.Error(1)
45 func (m *RmrMessengerMock) RtsMsg(msg *rmrCgo.MBuf){
49 func (m *RmrMessengerMock) FreeMsg(){
53 func (m *RmrMessengerMock) IsReady() bool{
58 func (m *RmrMessengerMock) Close(){