// Copyright 2023 Northern.tech AS
//
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//        http://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.

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

package mocks

import (
	time "time"

	mock "github.com/stretchr/testify/mock"
)

// WSConn is an autogenerated mock type for the WSConn type
type WSConn struct {
	mock.Mock
}

// Close provides a mock function with no fields
func (_m *WSConn) Close() error {
	ret := _m.Called()

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

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ReadMessage provides a mock function with no fields
func (_m *WSConn) ReadMessage() (int, []byte, error) {
	ret := _m.Called()

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

	var r0 int
	var r1 []byte
	var r2 error
	if rf, ok := ret.Get(0).(func() (int, []byte, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() int); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func() []byte); ok {
		r1 = rf()
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).([]byte)
		}
	}

	if rf, ok := ret.Get(2).(func() error); ok {
		r2 = rf()
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// SetPingHandler provides a mock function with given fields: h
func (_m *WSConn) SetPingHandler(h func(string) error) {
	_m.Called(h)
}

// SetPongHandler provides a mock function with given fields: h
func (_m *WSConn) SetPongHandler(h func(string) error) {
	_m.Called(h)
}

// SetReadDeadline provides a mock function with given fields: t
func (_m *WSConn) SetReadDeadline(t time.Time) error {
	ret := _m.Called(t)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(time.Time) error); ok {
		r0 = rf(t)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// WriteControl provides a mock function with given fields: messageType, data, deadline
func (_m *WSConn) WriteControl(messageType int, data []byte, deadline time.Time) error {
	ret := _m.Called(messageType, data, deadline)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(int, []byte, time.Time) error); ok {
		r0 = rf(messageType, data, deadline)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// WriteMessage provides a mock function with given fields: messageType, data
func (_m *WSConn) WriteMessage(messageType int, data []byte) error {
	ret := _m.Called(messageType, data)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(int, []byte) error); ok {
		r0 = rf(messageType, data)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// NewWSConn creates a new instance of WSConn. 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 NewWSConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *WSConn {
	mock := &WSConn{}
	mock.Mock.Test(t)

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

	return mock
}
