MCPcopy
hub / github.com/dropbox/godropbox / TestAddSimple

Method TestAddSimple

memcache/mock_client_test.go:21–33  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

19}
20
21func (s *MockClientSuite) TestAddSimple(c *C) {
22 item := createTestItem()
23
24 resp := s.client.Add(item)
25 c.Assert(resp.Error(), IsNil)
26 c.Assert(resp.Key(), Equals, item.Key)
27 c.Assert(resp.DataVersionId(), Equals, uint64(1))
28
29 gresp := s.client.Get(item.Key)
30 c.Assert(gresp.Error(), IsNil)
31 c.Assert(bytes.Equal(gresp.Value(), item.Value), IsTrue)
32 c.Assert(gresp.DataVersionId(), Equals, uint64(1))
33}
34
35func (s *MockClientSuite) TestAddExists(c *C) {
36 item := createTestItem()

Callers

nothing calls this directly

Calls 7

createTestItemFunction · 0.85
AddMethod · 0.65
ErrorMethod · 0.65
KeyMethod · 0.65
DataVersionIdMethod · 0.65
GetMethod · 0.65
ValueMethod · 0.65

Tested by

no test coverage detected