| 1 | package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src go1.14 fmt/" |
| 5 | "testingscip-go gomod github.com/golang/go/src go1.14 testing/" |
| 6 | |
| 7 | 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`/" |
| 8 | "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`/" |
| 9 | ) |
| 10 | |
| 11 | // Hook up gocheck into the gotest runner. |
| 12 | func Testscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Test().(t *testingscip-go gomod github.com/golang/go/src go1.14 testing/.Tscip-go gomod github.com/golang/go/src go1.14 testing/T#) { testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.TestingTscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/TestingT().(t) } |
| 13 | |
| 14 | type MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite# struct{} |
| 15 | |
| 16 | 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().(&MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#{}) |
| 17 | |
| 18 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockExecSuccessscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockExecSuccess().(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#) { |
| 19 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 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").Insertscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Insert().(map[string]string{ |
| 21 | "id": "mocked", |
| 22 | })).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(nil, nil) |
| 23 | |
| 24 | 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").Insertscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Insert().(map[string]string{ |
| 25 | "id": "mocked", |
| 26 | }).Execscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Exec().(mock) |
| 27 | 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.) |
| 28 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 29 | } |
| 30 | |
| 31 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockExecFailscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockExecFail().(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#) { |
| 32 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 33 | 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").Insertscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Insert().(map[string]string{ |
| 34 | "id": "mocked", |
| 35 | })).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(nil, fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.14 fmt/Errorf().("Expected error")) |
| 36 | |
| 37 | 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").Insertscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Insert().(map[string]string{ |
| 38 | "id": "mocked", |
| 39 | }).Execscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Exec().(mock) |
| 40 | 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`/.NotNilscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/NotNil.) |
| 41 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 42 | } |
| 43 | |
| 44 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunSuccessSingleResultscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunSuccessSingleResult().(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#) { |
| 45 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 46 | 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").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked")).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(map[string]interface{}{ |
| 47 | "id": "mocked", |
| 48 | }, nil) |
| 49 | |
| 50 | 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").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked").Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 51 | 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.) |
| 52 | |
| 53 | var response interface{} |
| 54 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 55 | |
| 56 | 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.) |
| 57 | 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., map[string]interface{}{"id": "mocked"}) |
| 58 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 59 | } |
| 60 | |
| 61 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunSuccessMultipleResultsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunSuccessMultipleResults().(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#) { |
| 62 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 63 | 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().([]interface{}{ |
| 64 | map[string]interface{}{"id": "mocked"}, |
| 65 | }, nil) |
| 66 | |
| 67 | 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) |
| 68 | 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.) |
| 69 | |
| 70 | var response []interface{} |
| 71 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 72 | |
| 73 | 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.) |
| 74 | 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., []interface{}{map[string]interface{}{"id": "mocked"}}) |
| 75 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 76 | } |
| 77 | |
| 78 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunSuccessChannelscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunSuccessChannel().(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#) { |
| 79 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 80 | ch := make(chan []interface{}) |
| 81 | 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) |
| 82 | go func() { |
| 83 | ch <- []interface{}{1, 2} |
| 84 | ch <- []interface{}{3} |
| 85 | ch <- []interface{}{4} |
| 86 | close(ch) |
| 87 | }() |
| 88 | 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) |
| 89 | 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.) |
| 90 | |
| 91 | var response []interface{} |
| 92 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 93 | |
| 94 | 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.) |
| 95 | 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., []interface{}{1, 2, 3, 4}) |
| 96 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 97 | } |
| 98 | |
| 99 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunSuccessFunctionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunSuccessFunction().(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#) { |
| 100 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 101 | n := 0 |
| 102 | f := func() []interface{} { |
| 103 | n++ |
| 104 | if n == 4 { |
| 105 | return nil |
| 106 | } |
| 107 | return []interface{}{n} |
| 108 | } |
| 109 | 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().(f, nil) |
| 110 | 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) |
| 111 | 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.) |
| 112 | |
| 113 | var response []interface{} |
| 114 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 115 | |
| 116 | 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.) |
| 117 | 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., []interface{}{1, 2, 3}) |
| 118 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 119 | } |
| 120 | |
| 121 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunSuccessMultipleResults_typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunSuccessMultipleResults_type().(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#) { |
| 122 | type document struct { |
| 123 | Id string |
| 124 | } |
| 125 | |
| 126 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 127 | 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().([]document{ |
| 128 | document{"mocked"}, |
| 129 | }, nil) |
| 130 | |
| 131 | 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) |
| 132 | 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.) |
| 133 | |
| 134 | var response []interface{} |
| 135 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 136 | |
| 137 | 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.) |
| 138 | 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., []document{document{"mocked"}}) |
| 139 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 140 | |
| 141 | res.Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#Close().() |
| 142 | } |
| 143 | |
| 144 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunMissingMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunMissingMock().(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#) { |
| 145 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 146 | 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().([]interface{}{ |
| 147 | map[string]interface{}{"id": "mocked"}, |
| 148 | }, nil).Oncescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Once().() |
| 149 | |
| 150 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(func() { |
| 151 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(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").Execscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Exec().(mock), 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.) |
| 152 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(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").Execscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Exec().(mock), 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.) |
| 153 | }, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.PanicMatchesscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/PanicMatches., ""+ |
| 154 | "rethinkdb: mock: This query was unexpected:(?s:.*)") |
| 155 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 156 | } |
| 157 | |
| 158 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunMissingQueryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunMissingQuery().(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#) { |
| 159 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 160 | 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().([]interface{}{ |
| 161 | map[string]interface{}{"id": "mocked"}, |
| 162 | }, nil).Twicescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Twice().() |
| 163 | |
| 164 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(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").Execscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Exec().(mock), 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.) |
| 165 | |
| 166 | t := &simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#{} |
| 167 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(t) |
| 168 | |
| 169 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(t.Failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#Failed().(), testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., true) |
| 170 | } |
| 171 | |
| 172 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunMissingQuerySinglescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunMissingQuerySingle().(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#) { |
| 173 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 174 | 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().([]interface{}{ |
| 175 | map[string]interface{}{"id": "mocked"}, |
| 176 | }, nil).Oncescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Once().() |
| 177 | |
| 178 | t := &simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#{} |
| 179 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(t) |
| 180 | |
| 181 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(t.Failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#Failed().(), testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., true) |
| 182 | } |
| 183 | |
| 184 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunMissingQueryMultiplescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunMissingQueryMultiple().(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#) { |
| 185 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 186 | 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().([]interface{}{ |
| 187 | map[string]interface{}{"id": "mocked"}, |
| 188 | }, nil).Twicescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Twice().() |
| 189 | |
| 190 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(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").Execscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Exec().(mock), 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.) |
| 191 | |
| 192 | t := &simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#{} |
| 193 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(t) |
| 194 | |
| 195 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(t.Failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#Failed().(), testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., true) |
| 196 | } |
| 197 | |
| 198 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRunMutlipleQueriesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRunMutlipleQueries().(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#) { |
| 199 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 200 | 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").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked1")).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(map[string]interface{}{ |
| 201 | "id": "mocked1", |
| 202 | }, nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(2) |
| 203 | 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").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked2")).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(map[string]interface{}{ |
| 204 | "id": "mocked2", |
| 205 | }, nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(1) |
| 206 | |
| 207 | var response interface{} |
| 208 | |
| 209 | // Query 1 |
| 210 | 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").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked1").Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 211 | 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.) |
| 212 | |
| 213 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 214 | |
| 215 | 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.) |
| 216 | 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., map[string]interface{}{"id": "mocked1"}) |
| 217 | |
| 218 | // Query 2 |
| 219 | 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").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked1").Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 220 | 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.) |
| 221 | |
| 222 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 223 | |
| 224 | 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.) |
| 225 | 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., map[string]interface{}{"id": "mocked1"}) |
| 226 | |
| 227 | // Query 3 |
| 228 | 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").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked2").Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 229 | 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.) |
| 230 | |
| 231 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 232 | |
| 233 | 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.) |
| 234 | 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., map[string]interface{}{"id": "mocked2"}) |
| 235 | |
| 236 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 237 | } |
| 238 | |
| 239 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockQueriesWithFuncsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockQueriesWithFuncs().(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#) { |
| 240 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 241 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]int{2}).Mapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Map().(func(row Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) interface{} { |
| 242 | return row.Addscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Add().(1) |
| 243 | })).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().([]int{3}, nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(2) |
| 244 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]int{4}).Mapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Map().(func(row1, row2 Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) interface{} { |
| 245 | return row1.Addscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Add().(1) |
| 246 | })).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().([]int{5}, nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(1) |
| 247 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]int{9}).Mapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Map().(func(row1, row2 Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) interface{} { |
| 248 | return row2.Addscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Add().(1) |
| 249 | })).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().([]int{10}, nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(1) |
| 250 | |
| 251 | var response []int |
| 252 | |
| 253 | // Query 1 |
| 254 | res, err := Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]int{2}).Mapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Map().(func(row Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) interface{} { |
| 255 | return row.Addscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Add().(1) |
| 256 | }).Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 257 | 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.) |
| 258 | |
| 259 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 260 | |
| 261 | 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.) |
| 262 | 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., []int{3}) |
| 263 | |
| 264 | // Query 2 |
| 265 | res, err = Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]int{2}).Mapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Map().(func(row Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) interface{} { |
| 266 | return row.Addscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Add().(1) |
| 267 | }).Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 268 | 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.) |
| 269 | |
| 270 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 271 | |
| 272 | 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.) |
| 273 | 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., []int{3}) |
| 274 | |
| 275 | // Query 3 |
| 276 | res, err = Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]int{4}).Mapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Map().(func(row1, row2 Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) interface{} { |
| 277 | return row1.Addscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Add().(1) |
| 278 | }).Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 279 | 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.) |
| 280 | |
| 281 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 282 | |
| 283 | 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.) |
| 284 | 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., []int{5}) |
| 285 | |
| 286 | // Query 5 |
| 287 | res, err = Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]int{9}).Mapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Map().(func(row1, row2 Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) interface{} { |
| 288 | return row2.Addscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Add().(1) |
| 289 | }).Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 290 | 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.) |
| 291 | |
| 292 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&response) |
| 293 | |
| 294 | 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.) |
| 295 | 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., []int{10}) |
| 296 | |
| 297 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 298 | } |
| 299 | |
| 300 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockAnythingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockAnything().(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#) { |
| 301 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 302 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(MockAnythingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockAnything().()).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().("okay", nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(1) |
| 303 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Table().("test").MockAnythingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#MockAnything().()).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().("okay2", nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(1) |
| 304 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Table().("test").Insertscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Insert().(map[string]interface{}{ |
| 305 | "id": MockAnythingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockAnything().(), |
| 306 | })).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().("okay3", nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(1) |
| 307 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]interface{}{1, 2, MockAnythingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockAnything().()})).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().("okay4", nil).Timesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Times().(1) |
| 308 | |
| 309 | var response string |
| 310 | |
| 311 | // Query 1 |
| 312 | res, err := Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().("test_1").Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 313 | 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.) |
| 314 | |
| 315 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 316 | |
| 317 | 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.) |
| 318 | 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., "okay") |
| 319 | |
| 320 | // Query 2 |
| 321 | res, err = Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Table().("test").Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().("mocked1").Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 322 | 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.) |
| 323 | |
| 324 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 325 | |
| 326 | 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.) |
| 327 | 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., "okay2") |
| 328 | |
| 329 | // Query 3 |
| 330 | res, err = Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Table().("test").Insertscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Insert().(map[string]interface{}{ |
| 331 | "id": "10ECE456-3C4D-4864-A843-879FCB0D133F", |
| 332 | }).Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 333 | 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.) |
| 334 | |
| 335 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 336 | |
| 337 | 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.) |
| 338 | 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., "okay3") |
| 339 | |
| 340 | // Query 3 |
| 341 | res, err = Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().([]interface{}{1, 2, 3}).Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 342 | 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.) |
| 343 | |
| 344 | err = res.Onescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#One().(&response) |
| 345 | |
| 346 | 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.) |
| 347 | 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., "okay4") |
| 348 | |
| 349 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 350 | } |
| 351 | |
| 352 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockRethinkStructsRunWritescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockRethinkStructsRunWrite().(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#) { |
| 353 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 354 | 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").Updatescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Update().(map[string]int{"val": 1})).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(WriteResponsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/WriteResponse#{ |
| 355 | Replacedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/WriteResponse#Replaced.: 1, |
| 356 | Changesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/WriteResponse#Changes.: []ChangeResponsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangeResponse#{ |
| 357 | {NewValuescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangeResponse#NewValue.: map[string]interface{}{"val": 1}, OldValuescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangeResponse#OldValue.: map[string]interface{}{"val": 0}}, |
| 358 | }, |
| 359 | }, nil) |
| 360 | |
| 361 | 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").Updatescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Update().(map[string]int{"val": 1}).RunWritescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#RunWrite().(mock) |
| 362 | 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.) |
| 363 | |
| 364 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(res, 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., WriteResponsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/WriteResponse#{ |
| 365 | Replacedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/WriteResponse#Replaced.: 1, |
| 366 | Changesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/WriteResponse#Changes.: []ChangeResponsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangeResponse#{ |
| 367 | {NewValuescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangeResponse#NewValue.: map[string]interface{}{"val": 1}, OldValuescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ChangeResponse#OldValue.: map[string]interface{}{"val": 0}}, |
| 368 | }, |
| 369 | }) |
| 370 | mock.AssertExpectationsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#AssertExpectations().(c) |
| 371 | } |
| 372 | |
| 373 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockMapSliceResultOkscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockMapSliceResultOk().(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#) { |
| 374 | type Some struct { |
| 375 | Id string |
| 376 | } |
| 377 | |
| 378 | result := []map[string]interface{}{ |
| 379 | {"Id": "test1"}, |
| 380 | {"Id": "test2"}, |
| 381 | } |
| 382 | |
| 383 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 384 | q := 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").GetAllscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#GetAll().() |
| 385 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(q).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(result, nil) |
| 386 | res, err := q.Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 387 | 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.) |
| 388 | |
| 389 | var casted []*Some |
| 390 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&casted) |
| 391 | 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.) |
| 392 | |
| 393 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(casted[0].Id, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., "test1") |
| 394 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(casted[1].Id, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., "test2") |
| 395 | } |
| 396 | |
| 397 | func (s *MockSuitescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#) TestMockPointerSliceResultOkscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockSuite#TestMockPointerSliceResultOk().(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#) { |
| 398 | type Some struct { |
| 399 | Id string |
| 400 | } |
| 401 | |
| 402 | result := []*Some{ |
| 403 | {Id: "test1"}, |
| 404 | {Id: "test2"}, |
| 405 | } |
| 406 | |
| 407 | mock := NewMockscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewMock().() |
| 408 | q := 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").GetAllscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#GetAll().() |
| 409 | mock.Onscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Mock#On().(q).Returnscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MockQuery#Return().(result, nil) |
| 410 | res, err := q.Runscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Run().(mock) |
| 411 | 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.) |
| 412 | |
| 413 | var casted []*Some |
| 414 | err = res.Allscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#All().(&casted) |
| 415 | 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.) |
| 416 | |
| 417 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(casted[0].Id, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., "test1") |
| 418 | c.Assertscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/C#Assert().(casted[1].Id, testscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/.Equalsscip-go gomod gopkg.in/check.v1 8fa46927fb4f `gopkg.in/check.v1`/Equals., "test2") |
| 419 | } |
| 420 | |
| 421 | type simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT# struct { |
| 422 | failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#failed. bool |
| 423 | } |
| 424 | |
| 425 | func (t *simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#) Logfscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#Logf().(format string, args ...interface{}) { |
| 426 | } |
| 427 | func (t *simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#) Errorfscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#Errorf().(format string, args ...interface{}) { |
| 428 | t.failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#failed. = true |
| 429 | } |
| 430 | func (t *simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#) FailNowscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#FailNow().() { |
| 431 | t.failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#failed. = true |
| 432 | } |
| 433 | func (t *simpleTestingTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#) Failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#Failed().() bool { |
| 434 | return t.failedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/simpleTestingT#failed. |
| 435 | } |