Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: impl/dummy/dummy_test.go

Issue 1259593005: Add 'user friendly' datastore API. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: more docs Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/raw_datastore.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package dummy 5 package dummy
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 9
10 dsS "github.com/luci/gae/service/datastore" 10 dsS "github.com/luci/gae/service/datastore"
(...skipping 27 matching lines...) Expand all
38 38
39 Convey("Info", func() { 39 Convey("Info", func() {
40 So(infoS.Get(c), ShouldNotBeNil) 40 So(infoS.Get(c), ShouldNotBeNil)
41 So(func() { 41 So(func() {
42 defer p() 42 defer p()
43 infoS.Get(c).Datacenter() 43 infoS.Get(c).Datacenter()
44 }, ShouldPanicWith, "dummy: method Info.Datacenter is no t implemented") 44 }, ShouldPanicWith, "dummy: method Info.Datacenter is no t implemented")
45 }) 45 })
46 46
47 Convey("Datastore", func() { 47 Convey("Datastore", func() {
48 » » » c = dsS.Set(c, Datastore()) 48 » » » c = dsS.SetRaw(c, Datastore())
49 So(dsS.Get(c), ShouldNotBeNil) 49 So(dsS.Get(c), ShouldNotBeNil)
50 So(func() { 50 So(func() {
51 defer p() 51 defer p()
52 dsS.Get(c).DecodeKey("wut") 52 dsS.Get(c).DecodeKey("wut")
53 }, ShouldPanicWith, "dummy: method Datastore.DecodeKey i s not implemented") 53 }, ShouldPanicWith, "dummy: method Datastore.DecodeKey i s not implemented")
54 }) 54 })
55 55
56 Convey("Memcache", func() { 56 Convey("Memcache", func() {
57 c = mcS.Set(c, Memcache()) 57 c = mcS.Set(c, Memcache())
58 So(mcS.Get(c), ShouldNotBeNil) 58 So(mcS.Get(c), ShouldNotBeNil)
59 So(func() { 59 So(func() {
60 defer p() 60 defer p()
61 mcS.Get(c).Add(nil) 61 mcS.Get(c).Add(nil)
62 }, ShouldPanicWith, "dummy: method Memcache.Add is not i mplemented") 62 }, ShouldPanicWith, "dummy: method Memcache.Add is not i mplemented")
63 }) 63 })
64 64
65 Convey("TaskQueue", func() { 65 Convey("TaskQueue", func() {
66 c = tqS.Set(c, TaskQueue()) 66 c = tqS.Set(c, TaskQueue())
67 So(tqS.Get(c), ShouldNotBeNil) 67 So(tqS.Get(c), ShouldNotBeNil)
68 So(func() { 68 So(func() {
69 defer p() 69 defer p()
70 tqS.Get(c).Purge("") 70 tqS.Get(c).Purge("")
71 }, ShouldPanicWith, "dummy: method TaskQueue.Purge is no t implemented") 71 }, ShouldPanicWith, "dummy: method TaskQueue.Purge is no t implemented")
72 }) 72 })
73 73
74 }) 74 })
75 } 75 }
OLDNEW
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/raw_datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698