// Code generated by Clue Mock Generator v0.17.0, DO NOT EDIT.
//
// Command:
// $ cmg gen douglasthrift.net/presence/wrap

package mockwrap

import (
	"net"
	"testing"

	"goa.design/clue/mock"

	"douglasthrift.net/presence/wrap"
)

type (
	Net struct {
		m *mock.Mock
		t *testing.T
	}

	NetInterfaceByNameFunc func(name string) (*net.Interface, error)
	NetInterfacesFunc      func() ([]net.Interface, error)
)

func NewNet(t *testing.T) *Net {
	var (
		m          = &Net{mock.New(), t}
		_ wrap.Net = m
	)
	return m
}

func (m *Net) AddInterfaceByName(f NetInterfaceByNameFunc) {
	m.m.Add("InterfaceByName", f)
}

func (m *Net) SetInterfaceByName(f NetInterfaceByNameFunc) {
	m.m.Set("InterfaceByName", f)
}

func (m *Net) InterfaceByName(name string) (*net.Interface, error) {
	if f := m.m.Next("InterfaceByName"); f != nil {
		return f.(NetInterfaceByNameFunc)(name)
	}
	m.t.Helper()
	m.t.Error("unexpected InterfaceByName call")
	return nil, nil
}

func (m *Net) AddInterfaces(f NetInterfacesFunc) {
	m.m.Add("Interfaces", f)
}

func (m *Net) SetInterfaces(f NetInterfacesFunc) {
	m.m.Set("Interfaces", f)
}

func (m *Net) Interfaces() ([]net.Interface, error) {
	if f := m.m.Next("Interfaces"); f != nil {
		return f.(NetInterfacesFunc)()
	}
	m.t.Helper()
	m.t.Error("unexpected Interfaces call")
	return nil, nil
}

func (m *Net) HasMore() bool {
	return m.m.HasMore()
}