Commit graph

4 commits

Author SHA1 Message Date
Pavel Karpy
0206bd9a5d [#302] pkg/container: Convert nil Attributes to nil message
Make `Attributes.ToV2` method to return `nil`
when called on `nil`. Make `NewAttributesFromV2`
function to return `nil` when called on `nil`.
Write corresponding unit tests.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Pavel Karpy
3984353d37 [#302] pkg/container: Document default values set in NewAttribute
Document field values of instance constructed via `NewAttribute`.
Assert the values in corresponding unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Pavel Karpy
8b7a433864 [#302] pkg/container: Convert nil Attribute to nil message
Document that `Attribute.ToV2` method returns
`nil` when is called on `nil`. Add
corresponding unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Alex Vanin
5ff7b5ba6b [#193] pkg/container: Increase test coverage
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-13 12:28:00 +03:00