frostfs-api-go-pogpp/pkg/object/address_test.go
Leonard Lyubich 353448c0c3 [#149] sdk/object: Add address field getters and setters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00

29 lines
480 B
Go

package object
import (
"testing"
"github.com/nspcc-dev/neofs-api-go/pkg/container"
"github.com/stretchr/testify/require"
)
func TestAddress_SetContainerID(t *testing.T) {
a := NewAddress()
cid := container.NewID()
cid.SetSHA256(randSHA256Checksum(t))
a.SetContainerID(cid)
require.Equal(t, cid, a.GetContainerID())
}
func TestAddress_SetObjectID(t *testing.T) {
a := NewAddress()
oid := randID(t)
a.SetObjectID(oid)
require.Equal(t, oid, a.GetObjectID())
}