// Code generated by mockery v2.50.0. DO NOT EDIT.

package mocks

import (
	context "context"

	protos "github.com/anycable/anycable-go/protos"
	mock "github.com/stretchr/testify/mock"
)

// RPCServer is an autogenerated mock type for the RPCServer type
type RPCServer struct {
	protos.UnimplementedRPCServer
	mock.Mock
}

// Command provides a mock function with given fields: _a0, _a1
func (_m *RPCServer) Command(_a0 context.Context, _a1 *protos.CommandMessage) (*protos.CommandResponse, error) {
	ret := _m.Called(_a0, _a1)

	if len(ret) == 0 {
		panic("no return value specified for Command")
	}

	var r0 *protos.CommandResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *protos.CommandMessage) (*protos.CommandResponse, error)); ok {
		return rf(_a0, _a1)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *protos.CommandMessage) *protos.CommandResponse); ok {
		r0 = rf(_a0, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*protos.CommandResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *protos.CommandMessage) error); ok {
		r1 = rf(_a0, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Connect provides a mock function with given fields: _a0, _a1
func (_m *RPCServer) Connect(_a0 context.Context, _a1 *protos.ConnectionRequest) (*protos.ConnectionResponse, error) {
	ret := _m.Called(_a0, _a1)

	if len(ret) == 0 {
		panic("no return value specified for Connect")
	}

	var r0 *protos.ConnectionResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *protos.ConnectionRequest) (*protos.ConnectionResponse, error)); ok {
		return rf(_a0, _a1)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *protos.ConnectionRequest) *protos.ConnectionResponse); ok {
		r0 = rf(_a0, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*protos.ConnectionResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *protos.ConnectionRequest) error); ok {
		r1 = rf(_a0, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Disconnect provides a mock function with given fields: _a0, _a1
func (_m *RPCServer) Disconnect(_a0 context.Context, _a1 *protos.DisconnectRequest) (*protos.DisconnectResponse, error) {
	ret := _m.Called(_a0, _a1)

	if len(ret) == 0 {
		panic("no return value specified for Disconnect")
	}

	var r0 *protos.DisconnectResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *protos.DisconnectRequest) (*protos.DisconnectResponse, error)); ok {
		return rf(_a0, _a1)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *protos.DisconnectRequest) *protos.DisconnectResponse); ok {
		r0 = rf(_a0, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*protos.DisconnectResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *protos.DisconnectRequest) error); ok {
		r1 = rf(_a0, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// mustEmbedUnimplementedRPCServer provides a mock function with no fields
func (_m *RPCServer) mustEmbedUnimplementedRPCServer() {
	_m.Called()
}

// NewRPCServer creates a new instance of RPCServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewRPCServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *RPCServer {
	mock := &RPCServer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
