Debian Codegraph @

cursor_test.go

raw symbols SCIP
1 package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/
2
3 import (
4 testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/ "gopkg.in/check.v1scip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/"
5 "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/integration/testsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/internal/integration/tests`/"
6 )
7
8 type CursorSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/CursorSuite# struct{}
9
10 var _ = testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Suitescip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Suite().(&CursorSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/CursorSuite#{})
11
12 func (s *CursorSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/CursorSuite#) TestCursor_One_Okscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/CursorSuite#TestCursor_One_Ok().(c *testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Cscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#) {
13 data := map[string]interface{}{
14 "A": 1,
15 "B": true,
16 }
17
18 mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().()
19 ch := make(chan []interface{})
20 mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(DBscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DB().("test").Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Table().("test")).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(ch, nil)
21 go func() {
22 ch <- []interface{}{data}
23 close(ch)
24 }()
25 res, err := DBscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DB().("test").Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Table().("test").Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock)
26 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
27
28 var response interface{}
29 err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response)
30
31 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(err, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.IsNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/IsNil.)
32 c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(response, testsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/internal/integration/tests`/.JsonEqualsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/internal/integration/tests`/JsonEquals., data)
33 mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c)
34 }