コード例 #1
0
ファイル: marshaller_test.go プロジェクト: dutchcoders/goamz
func (s *MarshallerSuite) TestMarshalEmptySets(c *gocheck.C) {
	testObj := testObjectWithEmptySets()
	attrs, err := dynamodb.MarshalAttributes(testObj)
	if err != nil {
		c.Errorf("Error from dynamodb.MarshalAttributes: %#v", err)
	}

	expected := testAttrsWithNilSets()
	c.Check(attrs, gocheck.DeepEquals, expected)
}
コード例 #2
0
ファイル: marshaller_test.go プロジェクト: Rudloff/platform
func (s *MarshallerSuite) TestMarshalZeroValues(c *C) {
	testObj := testObjectWithZeroValues()
	attrs, err := dynamodb.MarshalAttributes(testObj)
	if err != nil {
		c.Errorf("Error from dynamodb.MarshalAttributes: %#v", err)
	}

	expected := testAttrsWithZeroValues()
	c.Check(attrs, DeepEquals, expected)
}