forked from cerc-io/ipld-eth-server
bfe4531d7e
* Move chop lump transformer test to a generic log_note_transformer_test * Add test cases to transformer test - cat file flip - cat file pit vow - deal - dent * Move transformer tests over to transformer factor test file - drip drip - drip file ilk/repo/vow - pit file deb ceiling/ilk/stability fee - price feeds * Move LogNoteTransformer test into factory package and remove log specific transformer tests * Move Transformer test into factory package and remove log event specific transformer tests * Respond to PR comments
27 lines
654 B
Go
27 lines
654 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
|
|
}
|