-
Notifications
You must be signed in to change notification settings - Fork 199
/
preProcessorContainerMock.go
59 lines (48 loc) · 1.35 KB
/
preProcessorContainerMock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package mock
import (
"github.com/ElrondNetwork/elrond-go-core/data/block"
"github.com/ElrondNetwork/elrond-go/process"
)
// PreProcessorContainerMock -
type PreProcessorContainerMock struct {
GetCalled func(key block.Type) (process.PreProcessor, error)
KeysCalled func() []block.Type
}
// Get -
func (ppcm *PreProcessorContainerMock) Get(key block.Type) (process.PreProcessor, error) {
if ppcm.GetCalled == nil {
return &PreProcessorMock{}, nil
}
return ppcm.GetCalled(key)
}
// Add -
func (ppcm *PreProcessorContainerMock) Add(_ block.Type, _ process.PreProcessor) error {
panic("implement me")
}
// AddMultiple -
func (ppcm *PreProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.PreProcessor) error {
panic("implement me")
}
// Replace -
func (ppcm *PreProcessorContainerMock) Replace(_ block.Type, _ process.PreProcessor) error {
panic("implement me")
}
// Remove -
func (ppcm *PreProcessorContainerMock) Remove(_ block.Type) {
panic("implement me")
}
// Len -
func (ppcm *PreProcessorContainerMock) Len() int {
panic("implement me")
}
// Keys -
func (ppcm *PreProcessorContainerMock) Keys() []block.Type {
if ppcm.KeysCalled == nil {
return nil
}
return ppcm.KeysCalled()
}
// IsInterfaceNil returns true if there is no value under the interface
func (ppcm *PreProcessorContainerMock) IsInterfaceNil() bool {
return ppcm == nil
}