frostfs-api-go-pogpp/v2/container/json_test.go
Alex Vanin 2e1096200e [#172] v2/container: Add JSON converter for container
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00

22 lines
429 B
Go

package container_test
import (
"testing"
"github.com/nspcc-dev/neofs-api-go/v2/container"
"github.com/stretchr/testify/require"
)
func TestContainerJSON(t *testing.T) {
exp := generateContainer("container")
t.Run("non empty", func(t *testing.T) {
data := container.ContainerToJSON(exp)
require.NotNil(t, data)
got := container.ContainerFromJSON(data)
require.NotNil(t, got)
require.Equal(t, exp, got)
})
}