chainfee: use proper mock for WebAPIFeeSource in tests

This commit is contained in:
yyforyongyu committed 2023-10-29 13:24:27 +08:00
1 parent efcba4a836
commit 090892c613
2 files changed
+24 -14

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
package chainfee
import "github.com/stretchr/testify/mock"
type mockFeeSource struct {
mock.Mock
}
// A compile-time assertion to ensure that mockFeeSource implements the
// WebAPIFeeSource interface.
var _ WebAPIFeeSource = (*mockFeeSource)(nil)
func (m *mockFeeSource) GetFeeMap() (map[uint32]uint32, error) {
args := m.Called()
return args.Get(0).(map[uint32]uint32), args.Error(1)
}