frostfs-api-go/pkg/object/attribute_test.go
Leonard Lyubich 20d644758b [#140] sdk/object: Define Attribute type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00

23 lines
376 B
Go

package object
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestAttribute(t *testing.T) {
key, val := "some key", "some value"
a := NewAttribute()
a.SetKey(key)
a.SetValue(val)
require.Equal(t, key, a.GetKey())
require.Equal(t, val, a.GetValue())
aV2 := a.ToV2()
require.Equal(t, key, aV2.GetKey())
require.Equal(t, val, aV2.GetValue())
}