Documentation ¶
Index ¶
- type BundlerMock
- type FetcherMock
- type FileWriterMock
- func (fileWriterMock *FileWriterMock) AllFilesClosed() (allFilesClosed bool)
- func (fileWriterMock *FileWriterMock) Create(name string) (io.WriteCloser, error)
- func (fileWriterMock *FileWriterMock) DirectoriesCreated() (dirNames []string)
- func (fileWriterMock *FileWriterMock) ErrorOnCreate(name string, err error)
- func (fileWriterMock *FileWriterMock) ErrorOnMkdirAll(name string, err error)
- func (fileWriterMock *FileWriterMock) ErrorOnSaveJson(name string, err error)
- func (fileWriterMock *FileWriterMock) ErrorOnWrite(name string, err error)
- func (fileWriterMock *FileWriterMock) FileNamesWritten() (fNames []string)
- func (fileWriterMock *FileWriterMock) FileWritten(fname string) *WriteCloserMock
- func (fileWriterMock *FileWriterMock) JsonFileSaved(fname string) interface{}
- func (fileWriterMock *FileWriterMock) MkdirAll(name string) error
- func (fileWriterMock *FileWriterMock) SaveJsonFile(name string, value interface{}) error
- type HttpClientMock
- func (httpClientMock *HttpClientMock) OnRequest(url, responseData string, statusCode int)
- func (httpClientMock *HttpClientMock) RequestCount(url string) int
- func (httpClientMock *HttpClientMock) RoundTrip(req *http.Request) (*http.Response, error)
- func (httpClientMock *HttpClientMock) ToHttpClient() *http.Client
- type ReadCloseMock
- type WriteCloserMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundlerMock ¶
type FetcherMock ¶
func (*FetcherMock) GetInitialPage ¶
func (m *FetcherMock) GetInitialPage() (io.ReadCloser, error)
func (*FetcherMock) GetPage ¶
func (m *FetcherMock) GetPage(url string) (io.ReadCloser, error)
func (*FetcherMock) InitialPageUrl ¶
func (m *FetcherMock) InitialPageUrl() string
type FileWriterMock ¶
type FileWriterMock struct {
// contains filtered or unexported fields
}
func NewFilewriterMock ¶
func NewFilewriterMock() *FileWriterMock
func (*FileWriterMock) AllFilesClosed ¶
func (fileWriterMock *FileWriterMock) AllFilesClosed() (allFilesClosed bool)
func (*FileWriterMock) Create ¶
func (fileWriterMock *FileWriterMock) Create(name string) (io.WriteCloser, error)
func (*FileWriterMock) DirectoriesCreated ¶
func (fileWriterMock *FileWriterMock) DirectoriesCreated() (dirNames []string)
func (*FileWriterMock) ErrorOnCreate ¶
func (fileWriterMock *FileWriterMock) ErrorOnCreate(name string, err error)
func (*FileWriterMock) ErrorOnMkdirAll ¶
func (fileWriterMock *FileWriterMock) ErrorOnMkdirAll(name string, err error)
func (*FileWriterMock) ErrorOnSaveJson ¶
func (fileWriterMock *FileWriterMock) ErrorOnSaveJson(name string, err error)
func (*FileWriterMock) ErrorOnWrite ¶
func (fileWriterMock *FileWriterMock) ErrorOnWrite(name string, err error)
func (*FileWriterMock) FileNamesWritten ¶
func (fileWriterMock *FileWriterMock) FileNamesWritten() (fNames []string)
func (*FileWriterMock) FileWritten ¶
func (fileWriterMock *FileWriterMock) FileWritten(fname string) *WriteCloserMock
func (*FileWriterMock) JsonFileSaved ¶
func (fileWriterMock *FileWriterMock) JsonFileSaved(fname string) interface{}
func (*FileWriterMock) MkdirAll ¶
func (fileWriterMock *FileWriterMock) MkdirAll(name string) error
func (*FileWriterMock) SaveJsonFile ¶
func (fileWriterMock *FileWriterMock) SaveJsonFile(name string, value interface{}) error
type HttpClientMock ¶
type HttpClientMock struct {
// contains filtered or unexported fields
}
func NewHttpClientMock ¶
func NewHttpClientMock() *HttpClientMock
func (*HttpClientMock) OnRequest ¶
func (httpClientMock *HttpClientMock) OnRequest(url, responseData string, statusCode int)
func (*HttpClientMock) RequestCount ¶
func (httpClientMock *HttpClientMock) RequestCount(url string) int
func (*HttpClientMock) ToHttpClient ¶
func (httpClientMock *HttpClientMock) ToHttpClient() *http.Client
type ReadCloseMock ¶
type ReadCloseMock struct {
// contains filtered or unexported fields
}
func NewErrReadCloseMock ¶
func NewErrReadCloseMock(errorOnRead error) *ReadCloseMock
func NewReadCloseMock ¶
func NewReadCloseMock(data string) *ReadCloseMock
func (*ReadCloseMock) AssertCloseCalled ¶
func (mock *ReadCloseMock) AssertCloseCalled(t *testing.T) bool
func (*ReadCloseMock) Close ¶
func (mock *ReadCloseMock) Close() error
type WriteCloserMock ¶
type WriteCloserMock struct { FileName string FileContent []byte Closed bool WriteError error FileWriterMock *FileWriterMock }
func (*WriteCloserMock) Close ¶
func (writerCloserMock *WriteCloserMock) Close() error
Click to show internal directories.
Click to hide internal directories.