ipld-eth-server/pkg/transformers/test_data/mocks/log_note_converter.go
Elizabeth 0ab5ea1b25 Refactor more repo tests (#101)
* Use shared repository tests for deal

* Small updates to repo tests

* Use shared repository test examples for dent

* Use shared repository test examples for drip_drip

* Use shared repository test examples for drip_file_ilk

* Use shared repository test examples for drip_file_repo

* Use shared repository test examples for drip_file_vow

* Update formatting
2018-11-06 10:51:26 -06:00

27 lines
653 B
Go

package mocks
import (
"github.com/ethereum/go-ethereum/core/types"
)
type MockLogNoteConverter struct {
err error
returnModels []interface{}
PassedLogs []types.Log
ToModelsCalledCounter int
}
func (converter *MockLogNoteConverter) ToModels(ethLogs []types.Log) ([]interface{}, error) {
converter.PassedLogs = ethLogs
converter.ToModelsCalledCounter++
return converter.returnModels, converter.err
}
func (converter *MockLogNoteConverter) SetConverterError(e error) {
converter.err = e
}
func (converter *MockLogNoteConverter) SetReturnModels(models []interface{}) {
converter.returnModels = models
}