OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |