| 1 |
// Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| 2 |
|
| 3 |
package mocks |
| 4 |
|
| 5 |
import ( |
| 6 |
mock "github.com/stretchr/testify/mock" |
| 7 |
interfaces "go.skia.org/skia/bazel/exporter/interfaces" |
| 8 |
) |
| 9 |
|
| 10 |
// FileSystem is an autogenerated mock type for the FileSystem type |
| 11 |
type FileSystem struct { |
| 12 |
mock.Mock |
| 13 |
} |
| 14 |
|
| 15 |
// OpenFile provides a mock function with given fields: path |
| 16 |
func (_m *FileSystem) OpenFile(path string) (interfaces.Writer, error) { |
| 17 |
ret := _m.Called(path) |
| 18 |
|
| 19 |
if len(ret) == 0 { |
| 20 |
panic("no return value specified for OpenFile") |
| 21 |
} |
| 22 |
|
| 23 |
var r0 interfaces.Writer |
| 24 |
var r1 error |
| 25 |
if rf, ok := ret.Get(0).(func(string) (interfaces.Writer, error)); ok { |
| 26 |
return rf(path) |
| 27 |
} |
| 28 |
if rf, ok := ret.Get(0).(func(string) interfaces.Writer); ok { |
| 29 |
r0 = rf(path) |
| 30 |
} else { |
| 31 |
if ret.Get(0) != nil { |
| 32 |
r0 = ret.Get(0).(interfaces.Writer) |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
if rf, ok := ret.Get(1).(func(string) error); ok { |
| 37 |
r1 = rf(path) |
| 38 |
} else { |
| 39 |
r1 = ret.Error(1) |
| 40 |
} |
| 41 |
|
| 42 |
return r0, r1 |
| 43 |
} |
| 44 |
|
| 45 |
// ReadFile provides a mock function with given fields: filename |
| 46 |
func (_m *FileSystem) ReadFile(filename string) ([]byte, error) { |
| 47 |
ret := _m.Called(filename) |
| 48 |
|
| 49 |
if len(ret) == 0 { |
| 50 |
panic("no return value specified for ReadFile") |
| 51 |
} |
| 52 |
|
| 53 |
var r0 []byte |
| 54 |
var r1 error |
| 55 |
if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok { |
| 56 |
return rf(filename) |
| 57 |
} |
| 58 |
if rf, ok := ret.Get(0).(func(string) []byte); ok { |
| 59 |
r0 = rf(filename) |
| 60 |
} else { |
| 61 |
if ret.Get(0) != nil { |
| 62 |
r0 = ret.Get(0).([]byte) |
| 63 |
} |
| 64 |
} |
| 65 |
|
| 66 |
if rf, ok := ret.Get(1).(func(string) error); ok { |
| 67 |
r1 = rf(filename) |
| 68 |
} else { |
| 69 |
r1 = ret.Error(1) |
| 70 |
} |
| 71 |
|
| 72 |
return r0, r1 |
| 73 |
} |
| 74 |
|
| 75 |
// NewFileSystem creates a new instance of FileSystem. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| 76 |
// The first argument is typically a *testing.T value. |
| 77 |
func NewFileSystem(t interface { |
| 78 |
mock.TestingT |
| 79 |
Cleanup(func()) |
| 80 |
}) *FileSystem { |
| 81 |
mock := &FileSystem{} |
| 82 |
mock.Mock.Test(t) |
| 83 |
|
| 84 |
t.Cleanup(func() { mock.AssertExpectations(t) }) |
| 85 |
|
| 86 |
return mock |
| 87 |
} |