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

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

Issue 1772943003: Add wrappers for the module module (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: CL comments Created 4 years, 9 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/context.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"
11 infoS "github.com/luci/gae/service/info" 11 infoS "github.com/luci/gae/service/info"
12 mailS "github.com/luci/gae/service/mail" 12 mailS "github.com/luci/gae/service/mail"
13 mcS "github.com/luci/gae/service/memcache" 13 mcS "github.com/luci/gae/service/memcache"
14 modS "github.com/luci/gae/service/module"
14 tqS "github.com/luci/gae/service/taskqueue" 15 tqS "github.com/luci/gae/service/taskqueue"
15 userS "github.com/luci/gae/service/user" 16 userS "github.com/luci/gae/service/user"
16 . "github.com/smartystreets/goconvey/convey" 17 . "github.com/smartystreets/goconvey/convey"
17 "golang.org/x/net/context" 18 "golang.org/x/net/context"
18 ) 19 )
19 20
20 func TestContextAccess(t *testing.T) { 21 func TestContextAccess(t *testing.T) {
21 t.Parallel() 22 t.Parallel()
22 23
23 // p is a function which recovers an error and then immediately panics w ith 24 // p is a function which recovers an error and then immediately panics w ith
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 86
86 Convey("Mail", func() { 87 Convey("Mail", func() {
87 c = mailS.Set(c, Mail()) 88 c = mailS.Set(c, Mail())
88 So(mailS.Get(c), ShouldNotBeNil) 89 So(mailS.Get(c), ShouldNotBeNil)
89 So(func() { 90 So(func() {
90 defer p() 91 defer p()
91 _ = mailS.Get(c).Send(nil) 92 _ = mailS.Get(c).Send(nil)
92 }, ShouldPanicWith, "dummy: method Mail.Send is not impl emented") 93 }, ShouldPanicWith, "dummy: method Mail.Send is not impl emented")
93 }) 94 })
94 95
96 Convey("Module", func() {
97 c = modS.Set(c, Module())
98 So(modS.Get(c), ShouldNotBeNil)
99 So(func() {
100 defer p()
101 modS.Get(c).List()
102 }, ShouldPanicWith, "dummy: method Module.List is not im plemented")
103 })
95 }) 104 })
96 } 105 }
OLDNEW
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698