69 lines
2.2 KiB
Go
69 lines
2.2 KiB
Go
/*
|
|
* Copyright 2020 The Dragonfly Authors
|
|
*
|
|
* 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 MockGen. DO NOT EDIT.
|
|
// Source: piece_downloader.go
|
|
|
|
// Package mock_peer is a generated GoMock package.
|
|
package peer
|
|
|
|
import (
|
|
context "context"
|
|
io "io"
|
|
reflect "reflect"
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
)
|
|
|
|
// MockPieceDownloader is a mock of PieceDownloader interface.
|
|
type MockPieceDownloader struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockPieceDownloaderMockRecorder
|
|
}
|
|
|
|
// MockPieceDownloaderMockRecorder is the mock recorder for MockPieceDownloader.
|
|
type MockPieceDownloaderMockRecorder struct {
|
|
mock *MockPieceDownloader
|
|
}
|
|
|
|
// NewMockPieceDownloader creates a new mock instance.
|
|
func NewMockPieceDownloader(ctrl *gomock.Controller) *MockPieceDownloader {
|
|
mock := &MockPieceDownloader{ctrl: ctrl}
|
|
mock.recorder = &MockPieceDownloaderMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockPieceDownloader) EXPECT() *MockPieceDownloaderMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// DownloadPiece mocks base method.
|
|
func (m *MockPieceDownloader) DownloadPiece(arg0 context.Context, arg1 *DownloadPieceRequest) (io.Reader, io.Closer, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "DownloadPiece", arg0, arg1)
|
|
ret0, _ := ret[0].(io.Reader)
|
|
ret1, _ := ret[1].(io.Closer)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// DownloadPiece indicates an expected call of DownloadPiece.
|
|
func (mr *MockPieceDownloaderMockRecorder) DownloadPiece(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPiece", reflect.TypeOf((*MockPieceDownloader)(nil).DownloadPiece), arg0, arg1)
|
|
}
|