예제 #1
0
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
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)
}