forked from TrueCloudLab/frostfs-node
f699e82ea7
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>
32 lines
490 B
Go
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)
|
|
}
|