frostfs-node/pkg/morph/client/fee_test.go
Evgenii Stratonikov f699e82ea7 [#1560] morph/client: Remove customFees type
It is private, is a simple map and there is no complex logic to be wrapped in methods.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-07-04 09:29:01 +03:00

32 lines
490 B
Go

package client
import (
"testing"
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
"github.com/stretchr/testify/require"
)
func TestFees(t *testing.T) {
var v fees
const method = "some method"
var (
fee fixedn.Fixed8
def = fixedn.Fixed8(13)
)
v.defaultFee = def
fee = v.feeForMethod(method)
require.True(t, fee.Equal(def))
const customFee = fixedn.Fixed8(10)
v.setFeeForMethod(method, customFee)
fee = v.feeForMethod(method)
require.Equal(t, customFee, fee)
}