|
@@ -1,4 +1,4 @@
|
|
|
-// Code generated by http://github.com/gojuno/minimock (v3.3.13). DO NOT EDIT.
|
|
|
+// Code generated by http://github.com/gojuno/minimock (v3.3.14). DO NOT EDIT.
|
|
|
|
|
|
package mocks
|
|
|
|
|
@@ -6,7 +6,6 @@ package mocks
|
|
|
|
|
|
import (
|
|
|
"context"
|
|
|
- "database/sql"
|
|
|
"sync"
|
|
|
mm_atomic "sync/atomic"
|
|
|
mm_time "time"
|
|
@@ -20,26 +19,26 @@ type PlaceThingRepositoryMock struct {
|
|
|
t minimock.Tester
|
|
|
finishOnce sync.Once
|
|
|
|
|
|
- funcAdd func(ctx context.Context, req models.AddPlaceThingRequest, tx *sql.Tx) (err error)
|
|
|
- inspectFuncAdd func(ctx context.Context, req models.AddPlaceThingRequest, tx *sql.Tx)
|
|
|
+ funcAdd func(ctx context.Context, req models.AddPlaceThingRequest) (err error)
|
|
|
+ inspectFuncAdd func(ctx context.Context, req models.AddPlaceThingRequest)
|
|
|
afterAddCounter uint64
|
|
|
beforeAddCounter uint64
|
|
|
AddMock mPlaceThingRepositoryMockAdd
|
|
|
|
|
|
- funcDeleteThing func(ctx context.Context, thingID int, tx *sql.Tx) (err error)
|
|
|
- inspectFuncDeleteThing func(ctx context.Context, thingID int, tx *sql.Tx)
|
|
|
+ funcDeleteThing func(ctx context.Context, id uint64) (err error)
|
|
|
+ inspectFuncDeleteThing func(ctx context.Context, id uint64)
|
|
|
afterDeleteThingCounter uint64
|
|
|
beforeDeleteThingCounter uint64
|
|
|
DeleteThingMock mPlaceThingRepositoryMockDeleteThing
|
|
|
|
|
|
- funcGetByThingID func(ctx context.Context, thingID int) (pp1 *models.PlaceThing, err error)
|
|
|
- inspectFuncGetByThingID func(ctx context.Context, thingID int)
|
|
|
+ funcGetByThingID func(ctx context.Context, id uint64) (pp1 *models.PlaceThing, err error)
|
|
|
+ inspectFuncGetByThingID func(ctx context.Context, id uint64)
|
|
|
afterGetByThingIDCounter uint64
|
|
|
beforeGetByThingIDCounter uint64
|
|
|
GetByThingIDMock mPlaceThingRepositoryMockGetByThingID
|
|
|
|
|
|
- funcUpdatePlace func(ctx context.Context, req models.UpdatePlaceThingRequest, tx *sql.Tx) (err error)
|
|
|
- inspectFuncUpdatePlace func(ctx context.Context, req models.UpdatePlaceThingRequest, tx *sql.Tx)
|
|
|
+ funcUpdatePlace func(ctx context.Context, req models.UpdatePlaceThingRequest) (err error)
|
|
|
+ inspectFuncUpdatePlace func(ctx context.Context, req models.UpdatePlaceThingRequest)
|
|
|
afterUpdatePlaceCounter uint64
|
|
|
beforeUpdatePlaceCounter uint64
|
|
|
UpdatePlaceMock mPlaceThingRepositoryMockUpdatePlace
|
|
@@ -95,14 +94,12 @@ type PlaceThingRepositoryMockAddExpectation struct {
|
|
|
type PlaceThingRepositoryMockAddParams struct {
|
|
|
ctx context.Context
|
|
|
req models.AddPlaceThingRequest
|
|
|
- tx *sql.Tx
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockAddParamPtrs contains pointers to parameters of the PlaceThingRepository.Add
|
|
|
type PlaceThingRepositoryMockAddParamPtrs struct {
|
|
|
ctx *context.Context
|
|
|
req *models.AddPlaceThingRequest
|
|
|
- tx **sql.Tx
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockAddResults contains results of the PlaceThingRepository.Add
|
|
@@ -121,7 +118,7 @@ func (mmAdd *mPlaceThingRepositoryMockAdd) Optional() *mPlaceThingRepositoryMock
|
|
|
}
|
|
|
|
|
|
// Expect sets up expected params for PlaceThingRepository.Add
|
|
|
-func (mmAdd *mPlaceThingRepositoryMockAdd) Expect(ctx context.Context, req models.AddPlaceThingRequest, tx *sql.Tx) *mPlaceThingRepositoryMockAdd {
|
|
|
+func (mmAdd *mPlaceThingRepositoryMockAdd) Expect(ctx context.Context, req models.AddPlaceThingRequest) *mPlaceThingRepositoryMockAdd {
|
|
|
if mmAdd.mock.funcAdd != nil {
|
|
|
mmAdd.mock.t.Fatalf("PlaceThingRepositoryMock.Add mock is already set by Set")
|
|
|
}
|
|
@@ -134,7 +131,7 @@ func (mmAdd *mPlaceThingRepositoryMockAdd) Expect(ctx context.Context, req model
|
|
|
mmAdd.mock.t.Fatalf("PlaceThingRepositoryMock.Add mock is already set by ExpectParams functions")
|
|
|
}
|
|
|
|
|
|
- mmAdd.defaultExpectation.params = &PlaceThingRepositoryMockAddParams{ctx, req, tx}
|
|
|
+ mmAdd.defaultExpectation.params = &PlaceThingRepositoryMockAddParams{ctx, req}
|
|
|
for _, e := range mmAdd.expectations {
|
|
|
if minimock.Equal(e.params, mmAdd.defaultExpectation.params) {
|
|
|
mmAdd.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmAdd.defaultExpectation.params)
|
|
@@ -188,30 +185,8 @@ func (mmAdd *mPlaceThingRepositoryMockAdd) ExpectReqParam2(req models.AddPlaceTh
|
|
|
return mmAdd
|
|
|
}
|
|
|
|
|
|
-// ExpectTxParam3 sets up expected param tx for PlaceThingRepository.Add
|
|
|
-func (mmAdd *mPlaceThingRepositoryMockAdd) ExpectTxParam3(tx *sql.Tx) *mPlaceThingRepositoryMockAdd {
|
|
|
- if mmAdd.mock.funcAdd != nil {
|
|
|
- mmAdd.mock.t.Fatalf("PlaceThingRepositoryMock.Add mock is already set by Set")
|
|
|
- }
|
|
|
-
|
|
|
- if mmAdd.defaultExpectation == nil {
|
|
|
- mmAdd.defaultExpectation = &PlaceThingRepositoryMockAddExpectation{}
|
|
|
- }
|
|
|
-
|
|
|
- if mmAdd.defaultExpectation.params != nil {
|
|
|
- mmAdd.mock.t.Fatalf("PlaceThingRepositoryMock.Add mock is already set by Expect")
|
|
|
- }
|
|
|
-
|
|
|
- if mmAdd.defaultExpectation.paramPtrs == nil {
|
|
|
- mmAdd.defaultExpectation.paramPtrs = &PlaceThingRepositoryMockAddParamPtrs{}
|
|
|
- }
|
|
|
- mmAdd.defaultExpectation.paramPtrs.tx = &tx
|
|
|
-
|
|
|
- return mmAdd
|
|
|
-}
|
|
|
-
|
|
|
// Inspect accepts an inspector function that has same arguments as the PlaceThingRepository.Add
|
|
|
-func (mmAdd *mPlaceThingRepositoryMockAdd) Inspect(f func(ctx context.Context, req models.AddPlaceThingRequest, tx *sql.Tx)) *mPlaceThingRepositoryMockAdd {
|
|
|
+func (mmAdd *mPlaceThingRepositoryMockAdd) Inspect(f func(ctx context.Context, req models.AddPlaceThingRequest)) *mPlaceThingRepositoryMockAdd {
|
|
|
if mmAdd.mock.inspectFuncAdd != nil {
|
|
|
mmAdd.mock.t.Fatalf("Inspect function is already set for PlaceThingRepositoryMock.Add")
|
|
|
}
|
|
@@ -235,7 +210,7 @@ func (mmAdd *mPlaceThingRepositoryMockAdd) Return(err error) *PlaceThingReposito
|
|
|
}
|
|
|
|
|
|
// Set uses given function f to mock the PlaceThingRepository.Add method
|
|
|
-func (mmAdd *mPlaceThingRepositoryMockAdd) Set(f func(ctx context.Context, req models.AddPlaceThingRequest, tx *sql.Tx) (err error)) *PlaceThingRepositoryMock {
|
|
|
+func (mmAdd *mPlaceThingRepositoryMockAdd) Set(f func(ctx context.Context, req models.AddPlaceThingRequest) (err error)) *PlaceThingRepositoryMock {
|
|
|
if mmAdd.defaultExpectation != nil {
|
|
|
mmAdd.mock.t.Fatalf("Default expectation is already set for the PlaceThingRepository.Add method")
|
|
|
}
|
|
@@ -250,14 +225,14 @@ func (mmAdd *mPlaceThingRepositoryMockAdd) Set(f func(ctx context.Context, req m
|
|
|
|
|
|
// When sets expectation for the PlaceThingRepository.Add which will trigger the result defined by the following
|
|
|
// Then helper
|
|
|
-func (mmAdd *mPlaceThingRepositoryMockAdd) When(ctx context.Context, req models.AddPlaceThingRequest, tx *sql.Tx) *PlaceThingRepositoryMockAddExpectation {
|
|
|
+func (mmAdd *mPlaceThingRepositoryMockAdd) When(ctx context.Context, req models.AddPlaceThingRequest) *PlaceThingRepositoryMockAddExpectation {
|
|
|
if mmAdd.mock.funcAdd != nil {
|
|
|
mmAdd.mock.t.Fatalf("PlaceThingRepositoryMock.Add mock is already set by Set")
|
|
|
}
|
|
|
|
|
|
expectation := &PlaceThingRepositoryMockAddExpectation{
|
|
|
mock: mmAdd.mock,
|
|
|
- params: &PlaceThingRepositoryMockAddParams{ctx, req, tx},
|
|
|
+ params: &PlaceThingRepositoryMockAddParams{ctx, req},
|
|
|
}
|
|
|
mmAdd.expectations = append(mmAdd.expectations, expectation)
|
|
|
return expectation
|
|
@@ -290,15 +265,15 @@ func (mmAdd *mPlaceThingRepositoryMockAdd) invocationsDone() bool {
|
|
|
}
|
|
|
|
|
|
// Add implements thing.PlaceThingRepository
|
|
|
-func (mmAdd *PlaceThingRepositoryMock) Add(ctx context.Context, req models.AddPlaceThingRequest, tx *sql.Tx) (err error) {
|
|
|
+func (mmAdd *PlaceThingRepositoryMock) Add(ctx context.Context, req models.AddPlaceThingRequest) (err error) {
|
|
|
mm_atomic.AddUint64(&mmAdd.beforeAddCounter, 1)
|
|
|
defer mm_atomic.AddUint64(&mmAdd.afterAddCounter, 1)
|
|
|
|
|
|
if mmAdd.inspectFuncAdd != nil {
|
|
|
- mmAdd.inspectFuncAdd(ctx, req, tx)
|
|
|
+ mmAdd.inspectFuncAdd(ctx, req)
|
|
|
}
|
|
|
|
|
|
- mm_params := PlaceThingRepositoryMockAddParams{ctx, req, tx}
|
|
|
+ mm_params := PlaceThingRepositoryMockAddParams{ctx, req}
|
|
|
|
|
|
// Record call args
|
|
|
mmAdd.AddMock.mutex.Lock()
|
|
@@ -317,7 +292,7 @@ func (mmAdd *PlaceThingRepositoryMock) Add(ctx context.Context, req models.AddPl
|
|
|
mm_want := mmAdd.AddMock.defaultExpectation.params
|
|
|
mm_want_ptrs := mmAdd.AddMock.defaultExpectation.paramPtrs
|
|
|
|
|
|
- mm_got := PlaceThingRepositoryMockAddParams{ctx, req, tx}
|
|
|
+ mm_got := PlaceThingRepositoryMockAddParams{ctx, req}
|
|
|
|
|
|
if mm_want_ptrs != nil {
|
|
|
|
|
@@ -329,10 +304,6 @@ func (mmAdd *PlaceThingRepositoryMock) Add(ctx context.Context, req models.AddPl
|
|
|
mmAdd.t.Errorf("PlaceThingRepositoryMock.Add got unexpected parameter req, want: %#v, got: %#v%s\n", *mm_want_ptrs.req, mm_got.req, minimock.Diff(*mm_want_ptrs.req, mm_got.req))
|
|
|
}
|
|
|
|
|
|
- if mm_want_ptrs.tx != nil && !minimock.Equal(*mm_want_ptrs.tx, mm_got.tx) {
|
|
|
- mmAdd.t.Errorf("PlaceThingRepositoryMock.Add got unexpected parameter tx, want: %#v, got: %#v%s\n", *mm_want_ptrs.tx, mm_got.tx, minimock.Diff(*mm_want_ptrs.tx, mm_got.tx))
|
|
|
- }
|
|
|
-
|
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
|
mmAdd.t.Errorf("PlaceThingRepositoryMock.Add got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
|
}
|
|
@@ -344,9 +315,9 @@ func (mmAdd *PlaceThingRepositoryMock) Add(ctx context.Context, req models.AddPl
|
|
|
return (*mm_results).err
|
|
|
}
|
|
|
if mmAdd.funcAdd != nil {
|
|
|
- return mmAdd.funcAdd(ctx, req, tx)
|
|
|
+ return mmAdd.funcAdd(ctx, req)
|
|
|
}
|
|
|
- mmAdd.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.Add. %v %v %v", ctx, req, tx)
|
|
|
+ mmAdd.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.Add. %v %v", ctx, req)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -441,16 +412,14 @@ type PlaceThingRepositoryMockDeleteThingExpectation struct {
|
|
|
|
|
|
// PlaceThingRepositoryMockDeleteThingParams contains parameters of the PlaceThingRepository.DeleteThing
|
|
|
type PlaceThingRepositoryMockDeleteThingParams struct {
|
|
|
- ctx context.Context
|
|
|
- thingID int
|
|
|
- tx *sql.Tx
|
|
|
+ ctx context.Context
|
|
|
+ id uint64
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockDeleteThingParamPtrs contains pointers to parameters of the PlaceThingRepository.DeleteThing
|
|
|
type PlaceThingRepositoryMockDeleteThingParamPtrs struct {
|
|
|
- ctx *context.Context
|
|
|
- thingID *int
|
|
|
- tx **sql.Tx
|
|
|
+ ctx *context.Context
|
|
|
+ id *uint64
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockDeleteThingResults contains results of the PlaceThingRepository.DeleteThing
|
|
@@ -469,7 +438,7 @@ func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Optional() *mPlaceThi
|
|
|
}
|
|
|
|
|
|
// Expect sets up expected params for PlaceThingRepository.DeleteThing
|
|
|
-func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Expect(ctx context.Context, thingID int, tx *sql.Tx) *mPlaceThingRepositoryMockDeleteThing {
|
|
|
+func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Expect(ctx context.Context, id uint64) *mPlaceThingRepositoryMockDeleteThing {
|
|
|
if mmDeleteThing.mock.funcDeleteThing != nil {
|
|
|
mmDeleteThing.mock.t.Fatalf("PlaceThingRepositoryMock.DeleteThing mock is already set by Set")
|
|
|
}
|
|
@@ -482,7 +451,7 @@ func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Expect(ctx context.Co
|
|
|
mmDeleteThing.mock.t.Fatalf("PlaceThingRepositoryMock.DeleteThing mock is already set by ExpectParams functions")
|
|
|
}
|
|
|
|
|
|
- mmDeleteThing.defaultExpectation.params = &PlaceThingRepositoryMockDeleteThingParams{ctx, thingID, tx}
|
|
|
+ mmDeleteThing.defaultExpectation.params = &PlaceThingRepositoryMockDeleteThingParams{ctx, id}
|
|
|
for _, e := range mmDeleteThing.expectations {
|
|
|
if minimock.Equal(e.params, mmDeleteThing.defaultExpectation.params) {
|
|
|
mmDeleteThing.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDeleteThing.defaultExpectation.params)
|
|
@@ -514,8 +483,8 @@ func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) ExpectCtxParam1(ctx c
|
|
|
return mmDeleteThing
|
|
|
}
|
|
|
|
|
|
-// ExpectThingIDParam2 sets up expected param thingID for PlaceThingRepository.DeleteThing
|
|
|
-func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) ExpectThingIDParam2(thingID int) *mPlaceThingRepositoryMockDeleteThing {
|
|
|
+// ExpectIdParam2 sets up expected param id for PlaceThingRepository.DeleteThing
|
|
|
+func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) ExpectIdParam2(id uint64) *mPlaceThingRepositoryMockDeleteThing {
|
|
|
if mmDeleteThing.mock.funcDeleteThing != nil {
|
|
|
mmDeleteThing.mock.t.Fatalf("PlaceThingRepositoryMock.DeleteThing mock is already set by Set")
|
|
|
}
|
|
@@ -531,35 +500,13 @@ func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) ExpectThingIDParam2(t
|
|
|
if mmDeleteThing.defaultExpectation.paramPtrs == nil {
|
|
|
mmDeleteThing.defaultExpectation.paramPtrs = &PlaceThingRepositoryMockDeleteThingParamPtrs{}
|
|
|
}
|
|
|
- mmDeleteThing.defaultExpectation.paramPtrs.thingID = &thingID
|
|
|
-
|
|
|
- return mmDeleteThing
|
|
|
-}
|
|
|
-
|
|
|
-// ExpectTxParam3 sets up expected param tx for PlaceThingRepository.DeleteThing
|
|
|
-func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) ExpectTxParam3(tx *sql.Tx) *mPlaceThingRepositoryMockDeleteThing {
|
|
|
- if mmDeleteThing.mock.funcDeleteThing != nil {
|
|
|
- mmDeleteThing.mock.t.Fatalf("PlaceThingRepositoryMock.DeleteThing mock is already set by Set")
|
|
|
- }
|
|
|
-
|
|
|
- if mmDeleteThing.defaultExpectation == nil {
|
|
|
- mmDeleteThing.defaultExpectation = &PlaceThingRepositoryMockDeleteThingExpectation{}
|
|
|
- }
|
|
|
-
|
|
|
- if mmDeleteThing.defaultExpectation.params != nil {
|
|
|
- mmDeleteThing.mock.t.Fatalf("PlaceThingRepositoryMock.DeleteThing mock is already set by Expect")
|
|
|
- }
|
|
|
-
|
|
|
- if mmDeleteThing.defaultExpectation.paramPtrs == nil {
|
|
|
- mmDeleteThing.defaultExpectation.paramPtrs = &PlaceThingRepositoryMockDeleteThingParamPtrs{}
|
|
|
- }
|
|
|
- mmDeleteThing.defaultExpectation.paramPtrs.tx = &tx
|
|
|
+ mmDeleteThing.defaultExpectation.paramPtrs.id = &id
|
|
|
|
|
|
return mmDeleteThing
|
|
|
}
|
|
|
|
|
|
// Inspect accepts an inspector function that has same arguments as the PlaceThingRepository.DeleteThing
|
|
|
-func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Inspect(f func(ctx context.Context, thingID int, tx *sql.Tx)) *mPlaceThingRepositoryMockDeleteThing {
|
|
|
+func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Inspect(f func(ctx context.Context, id uint64)) *mPlaceThingRepositoryMockDeleteThing {
|
|
|
if mmDeleteThing.mock.inspectFuncDeleteThing != nil {
|
|
|
mmDeleteThing.mock.t.Fatalf("Inspect function is already set for PlaceThingRepositoryMock.DeleteThing")
|
|
|
}
|
|
@@ -583,7 +530,7 @@ func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Return(err error) *Pl
|
|
|
}
|
|
|
|
|
|
// Set uses given function f to mock the PlaceThingRepository.DeleteThing method
|
|
|
-func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Set(f func(ctx context.Context, thingID int, tx *sql.Tx) (err error)) *PlaceThingRepositoryMock {
|
|
|
+func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Set(f func(ctx context.Context, id uint64) (err error)) *PlaceThingRepositoryMock {
|
|
|
if mmDeleteThing.defaultExpectation != nil {
|
|
|
mmDeleteThing.mock.t.Fatalf("Default expectation is already set for the PlaceThingRepository.DeleteThing method")
|
|
|
}
|
|
@@ -598,14 +545,14 @@ func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) Set(f func(ctx contex
|
|
|
|
|
|
// When sets expectation for the PlaceThingRepository.DeleteThing which will trigger the result defined by the following
|
|
|
// Then helper
|
|
|
-func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) When(ctx context.Context, thingID int, tx *sql.Tx) *PlaceThingRepositoryMockDeleteThingExpectation {
|
|
|
+func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) When(ctx context.Context, id uint64) *PlaceThingRepositoryMockDeleteThingExpectation {
|
|
|
if mmDeleteThing.mock.funcDeleteThing != nil {
|
|
|
mmDeleteThing.mock.t.Fatalf("PlaceThingRepositoryMock.DeleteThing mock is already set by Set")
|
|
|
}
|
|
|
|
|
|
expectation := &PlaceThingRepositoryMockDeleteThingExpectation{
|
|
|
mock: mmDeleteThing.mock,
|
|
|
- params: &PlaceThingRepositoryMockDeleteThingParams{ctx, thingID, tx},
|
|
|
+ params: &PlaceThingRepositoryMockDeleteThingParams{ctx, id},
|
|
|
}
|
|
|
mmDeleteThing.expectations = append(mmDeleteThing.expectations, expectation)
|
|
|
return expectation
|
|
@@ -638,15 +585,15 @@ func (mmDeleteThing *mPlaceThingRepositoryMockDeleteThing) invocationsDone() boo
|
|
|
}
|
|
|
|
|
|
// DeleteThing implements thing.PlaceThingRepository
|
|
|
-func (mmDeleteThing *PlaceThingRepositoryMock) DeleteThing(ctx context.Context, thingID int, tx *sql.Tx) (err error) {
|
|
|
+func (mmDeleteThing *PlaceThingRepositoryMock) DeleteThing(ctx context.Context, id uint64) (err error) {
|
|
|
mm_atomic.AddUint64(&mmDeleteThing.beforeDeleteThingCounter, 1)
|
|
|
defer mm_atomic.AddUint64(&mmDeleteThing.afterDeleteThingCounter, 1)
|
|
|
|
|
|
if mmDeleteThing.inspectFuncDeleteThing != nil {
|
|
|
- mmDeleteThing.inspectFuncDeleteThing(ctx, thingID, tx)
|
|
|
+ mmDeleteThing.inspectFuncDeleteThing(ctx, id)
|
|
|
}
|
|
|
|
|
|
- mm_params := PlaceThingRepositoryMockDeleteThingParams{ctx, thingID, tx}
|
|
|
+ mm_params := PlaceThingRepositoryMockDeleteThingParams{ctx, id}
|
|
|
|
|
|
// Record call args
|
|
|
mmDeleteThing.DeleteThingMock.mutex.Lock()
|
|
@@ -665,7 +612,7 @@ func (mmDeleteThing *PlaceThingRepositoryMock) DeleteThing(ctx context.Context,
|
|
|
mm_want := mmDeleteThing.DeleteThingMock.defaultExpectation.params
|
|
|
mm_want_ptrs := mmDeleteThing.DeleteThingMock.defaultExpectation.paramPtrs
|
|
|
|
|
|
- mm_got := PlaceThingRepositoryMockDeleteThingParams{ctx, thingID, tx}
|
|
|
+ mm_got := PlaceThingRepositoryMockDeleteThingParams{ctx, id}
|
|
|
|
|
|
if mm_want_ptrs != nil {
|
|
|
|
|
@@ -673,12 +620,8 @@ func (mmDeleteThing *PlaceThingRepositoryMock) DeleteThing(ctx context.Context,
|
|
|
mmDeleteThing.t.Errorf("PlaceThingRepositoryMock.DeleteThing got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx))
|
|
|
}
|
|
|
|
|
|
- if mm_want_ptrs.thingID != nil && !minimock.Equal(*mm_want_ptrs.thingID, mm_got.thingID) {
|
|
|
- mmDeleteThing.t.Errorf("PlaceThingRepositoryMock.DeleteThing got unexpected parameter thingID, want: %#v, got: %#v%s\n", *mm_want_ptrs.thingID, mm_got.thingID, minimock.Diff(*mm_want_ptrs.thingID, mm_got.thingID))
|
|
|
- }
|
|
|
-
|
|
|
- if mm_want_ptrs.tx != nil && !minimock.Equal(*mm_want_ptrs.tx, mm_got.tx) {
|
|
|
- mmDeleteThing.t.Errorf("PlaceThingRepositoryMock.DeleteThing got unexpected parameter tx, want: %#v, got: %#v%s\n", *mm_want_ptrs.tx, mm_got.tx, minimock.Diff(*mm_want_ptrs.tx, mm_got.tx))
|
|
|
+ if mm_want_ptrs.id != nil && !minimock.Equal(*mm_want_ptrs.id, mm_got.id) {
|
|
|
+ mmDeleteThing.t.Errorf("PlaceThingRepositoryMock.DeleteThing got unexpected parameter id, want: %#v, got: %#v%s\n", *mm_want_ptrs.id, mm_got.id, minimock.Diff(*mm_want_ptrs.id, mm_got.id))
|
|
|
}
|
|
|
|
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
@@ -692,9 +635,9 @@ func (mmDeleteThing *PlaceThingRepositoryMock) DeleteThing(ctx context.Context,
|
|
|
return (*mm_results).err
|
|
|
}
|
|
|
if mmDeleteThing.funcDeleteThing != nil {
|
|
|
- return mmDeleteThing.funcDeleteThing(ctx, thingID, tx)
|
|
|
+ return mmDeleteThing.funcDeleteThing(ctx, id)
|
|
|
}
|
|
|
- mmDeleteThing.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.DeleteThing. %v %v %v", ctx, thingID, tx)
|
|
|
+ mmDeleteThing.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.DeleteThing. %v %v", ctx, id)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -789,14 +732,14 @@ type PlaceThingRepositoryMockGetByThingIDExpectation struct {
|
|
|
|
|
|
// PlaceThingRepositoryMockGetByThingIDParams contains parameters of the PlaceThingRepository.GetByThingID
|
|
|
type PlaceThingRepositoryMockGetByThingIDParams struct {
|
|
|
- ctx context.Context
|
|
|
- thingID int
|
|
|
+ ctx context.Context
|
|
|
+ id uint64
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockGetByThingIDParamPtrs contains pointers to parameters of the PlaceThingRepository.GetByThingID
|
|
|
type PlaceThingRepositoryMockGetByThingIDParamPtrs struct {
|
|
|
- ctx *context.Context
|
|
|
- thingID *int
|
|
|
+ ctx *context.Context
|
|
|
+ id *uint64
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockGetByThingIDResults contains results of the PlaceThingRepository.GetByThingID
|
|
@@ -816,7 +759,7 @@ func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Optional() *mPlaceT
|
|
|
}
|
|
|
|
|
|
// Expect sets up expected params for PlaceThingRepository.GetByThingID
|
|
|
-func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Expect(ctx context.Context, thingID int) *mPlaceThingRepositoryMockGetByThingID {
|
|
|
+func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Expect(ctx context.Context, id uint64) *mPlaceThingRepositoryMockGetByThingID {
|
|
|
if mmGetByThingID.mock.funcGetByThingID != nil {
|
|
|
mmGetByThingID.mock.t.Fatalf("PlaceThingRepositoryMock.GetByThingID mock is already set by Set")
|
|
|
}
|
|
@@ -829,7 +772,7 @@ func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Expect(ctx context.
|
|
|
mmGetByThingID.mock.t.Fatalf("PlaceThingRepositoryMock.GetByThingID mock is already set by ExpectParams functions")
|
|
|
}
|
|
|
|
|
|
- mmGetByThingID.defaultExpectation.params = &PlaceThingRepositoryMockGetByThingIDParams{ctx, thingID}
|
|
|
+ mmGetByThingID.defaultExpectation.params = &PlaceThingRepositoryMockGetByThingIDParams{ctx, id}
|
|
|
for _, e := range mmGetByThingID.expectations {
|
|
|
if minimock.Equal(e.params, mmGetByThingID.defaultExpectation.params) {
|
|
|
mmGetByThingID.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetByThingID.defaultExpectation.params)
|
|
@@ -861,8 +804,8 @@ func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) ExpectCtxParam1(ctx
|
|
|
return mmGetByThingID
|
|
|
}
|
|
|
|
|
|
-// ExpectThingIDParam2 sets up expected param thingID for PlaceThingRepository.GetByThingID
|
|
|
-func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) ExpectThingIDParam2(thingID int) *mPlaceThingRepositoryMockGetByThingID {
|
|
|
+// ExpectIdParam2 sets up expected param id for PlaceThingRepository.GetByThingID
|
|
|
+func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) ExpectIdParam2(id uint64) *mPlaceThingRepositoryMockGetByThingID {
|
|
|
if mmGetByThingID.mock.funcGetByThingID != nil {
|
|
|
mmGetByThingID.mock.t.Fatalf("PlaceThingRepositoryMock.GetByThingID mock is already set by Set")
|
|
|
}
|
|
@@ -878,13 +821,13 @@ func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) ExpectThingIDParam2
|
|
|
if mmGetByThingID.defaultExpectation.paramPtrs == nil {
|
|
|
mmGetByThingID.defaultExpectation.paramPtrs = &PlaceThingRepositoryMockGetByThingIDParamPtrs{}
|
|
|
}
|
|
|
- mmGetByThingID.defaultExpectation.paramPtrs.thingID = &thingID
|
|
|
+ mmGetByThingID.defaultExpectation.paramPtrs.id = &id
|
|
|
|
|
|
return mmGetByThingID
|
|
|
}
|
|
|
|
|
|
// Inspect accepts an inspector function that has same arguments as the PlaceThingRepository.GetByThingID
|
|
|
-func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Inspect(f func(ctx context.Context, thingID int)) *mPlaceThingRepositoryMockGetByThingID {
|
|
|
+func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Inspect(f func(ctx context.Context, id uint64)) *mPlaceThingRepositoryMockGetByThingID {
|
|
|
if mmGetByThingID.mock.inspectFuncGetByThingID != nil {
|
|
|
mmGetByThingID.mock.t.Fatalf("Inspect function is already set for PlaceThingRepositoryMock.GetByThingID")
|
|
|
}
|
|
@@ -908,7 +851,7 @@ func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Return(pp1 *models.
|
|
|
}
|
|
|
|
|
|
// Set uses given function f to mock the PlaceThingRepository.GetByThingID method
|
|
|
-func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Set(f func(ctx context.Context, thingID int) (pp1 *models.PlaceThing, err error)) *PlaceThingRepositoryMock {
|
|
|
+func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Set(f func(ctx context.Context, id uint64) (pp1 *models.PlaceThing, err error)) *PlaceThingRepositoryMock {
|
|
|
if mmGetByThingID.defaultExpectation != nil {
|
|
|
mmGetByThingID.mock.t.Fatalf("Default expectation is already set for the PlaceThingRepository.GetByThingID method")
|
|
|
}
|
|
@@ -923,14 +866,14 @@ func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) Set(f func(ctx cont
|
|
|
|
|
|
// When sets expectation for the PlaceThingRepository.GetByThingID which will trigger the result defined by the following
|
|
|
// Then helper
|
|
|
-func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) When(ctx context.Context, thingID int) *PlaceThingRepositoryMockGetByThingIDExpectation {
|
|
|
+func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) When(ctx context.Context, id uint64) *PlaceThingRepositoryMockGetByThingIDExpectation {
|
|
|
if mmGetByThingID.mock.funcGetByThingID != nil {
|
|
|
mmGetByThingID.mock.t.Fatalf("PlaceThingRepositoryMock.GetByThingID mock is already set by Set")
|
|
|
}
|
|
|
|
|
|
expectation := &PlaceThingRepositoryMockGetByThingIDExpectation{
|
|
|
mock: mmGetByThingID.mock,
|
|
|
- params: &PlaceThingRepositoryMockGetByThingIDParams{ctx, thingID},
|
|
|
+ params: &PlaceThingRepositoryMockGetByThingIDParams{ctx, id},
|
|
|
}
|
|
|
mmGetByThingID.expectations = append(mmGetByThingID.expectations, expectation)
|
|
|
return expectation
|
|
@@ -963,15 +906,15 @@ func (mmGetByThingID *mPlaceThingRepositoryMockGetByThingID) invocationsDone() b
|
|
|
}
|
|
|
|
|
|
// GetByThingID implements thing.PlaceThingRepository
|
|
|
-func (mmGetByThingID *PlaceThingRepositoryMock) GetByThingID(ctx context.Context, thingID int) (pp1 *models.PlaceThing, err error) {
|
|
|
+func (mmGetByThingID *PlaceThingRepositoryMock) GetByThingID(ctx context.Context, id uint64) (pp1 *models.PlaceThing, err error) {
|
|
|
mm_atomic.AddUint64(&mmGetByThingID.beforeGetByThingIDCounter, 1)
|
|
|
defer mm_atomic.AddUint64(&mmGetByThingID.afterGetByThingIDCounter, 1)
|
|
|
|
|
|
if mmGetByThingID.inspectFuncGetByThingID != nil {
|
|
|
- mmGetByThingID.inspectFuncGetByThingID(ctx, thingID)
|
|
|
+ mmGetByThingID.inspectFuncGetByThingID(ctx, id)
|
|
|
}
|
|
|
|
|
|
- mm_params := PlaceThingRepositoryMockGetByThingIDParams{ctx, thingID}
|
|
|
+ mm_params := PlaceThingRepositoryMockGetByThingIDParams{ctx, id}
|
|
|
|
|
|
// Record call args
|
|
|
mmGetByThingID.GetByThingIDMock.mutex.Lock()
|
|
@@ -990,7 +933,7 @@ func (mmGetByThingID *PlaceThingRepositoryMock) GetByThingID(ctx context.Context
|
|
|
mm_want := mmGetByThingID.GetByThingIDMock.defaultExpectation.params
|
|
|
mm_want_ptrs := mmGetByThingID.GetByThingIDMock.defaultExpectation.paramPtrs
|
|
|
|
|
|
- mm_got := PlaceThingRepositoryMockGetByThingIDParams{ctx, thingID}
|
|
|
+ mm_got := PlaceThingRepositoryMockGetByThingIDParams{ctx, id}
|
|
|
|
|
|
if mm_want_ptrs != nil {
|
|
|
|
|
@@ -998,8 +941,8 @@ func (mmGetByThingID *PlaceThingRepositoryMock) GetByThingID(ctx context.Context
|
|
|
mmGetByThingID.t.Errorf("PlaceThingRepositoryMock.GetByThingID got unexpected parameter ctx, want: %#v, got: %#v%s\n", *mm_want_ptrs.ctx, mm_got.ctx, minimock.Diff(*mm_want_ptrs.ctx, mm_got.ctx))
|
|
|
}
|
|
|
|
|
|
- if mm_want_ptrs.thingID != nil && !minimock.Equal(*mm_want_ptrs.thingID, mm_got.thingID) {
|
|
|
- mmGetByThingID.t.Errorf("PlaceThingRepositoryMock.GetByThingID got unexpected parameter thingID, want: %#v, got: %#v%s\n", *mm_want_ptrs.thingID, mm_got.thingID, minimock.Diff(*mm_want_ptrs.thingID, mm_got.thingID))
|
|
|
+ if mm_want_ptrs.id != nil && !minimock.Equal(*mm_want_ptrs.id, mm_got.id) {
|
|
|
+ mmGetByThingID.t.Errorf("PlaceThingRepositoryMock.GetByThingID got unexpected parameter id, want: %#v, got: %#v%s\n", *mm_want_ptrs.id, mm_got.id, minimock.Diff(*mm_want_ptrs.id, mm_got.id))
|
|
|
}
|
|
|
|
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
@@ -1013,9 +956,9 @@ func (mmGetByThingID *PlaceThingRepositoryMock) GetByThingID(ctx context.Context
|
|
|
return (*mm_results).pp1, (*mm_results).err
|
|
|
}
|
|
|
if mmGetByThingID.funcGetByThingID != nil {
|
|
|
- return mmGetByThingID.funcGetByThingID(ctx, thingID)
|
|
|
+ return mmGetByThingID.funcGetByThingID(ctx, id)
|
|
|
}
|
|
|
- mmGetByThingID.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.GetByThingID. %v %v", ctx, thingID)
|
|
|
+ mmGetByThingID.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.GetByThingID. %v %v", ctx, id)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -1112,14 +1055,12 @@ type PlaceThingRepositoryMockUpdatePlaceExpectation struct {
|
|
|
type PlaceThingRepositoryMockUpdatePlaceParams struct {
|
|
|
ctx context.Context
|
|
|
req models.UpdatePlaceThingRequest
|
|
|
- tx *sql.Tx
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockUpdatePlaceParamPtrs contains pointers to parameters of the PlaceThingRepository.UpdatePlace
|
|
|
type PlaceThingRepositoryMockUpdatePlaceParamPtrs struct {
|
|
|
ctx *context.Context
|
|
|
req *models.UpdatePlaceThingRequest
|
|
|
- tx **sql.Tx
|
|
|
}
|
|
|
|
|
|
// PlaceThingRepositoryMockUpdatePlaceResults contains results of the PlaceThingRepository.UpdatePlace
|
|
@@ -1138,7 +1079,7 @@ func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Optional() *mPlaceThi
|
|
|
}
|
|
|
|
|
|
// Expect sets up expected params for PlaceThingRepository.UpdatePlace
|
|
|
-func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Expect(ctx context.Context, req models.UpdatePlaceThingRequest, tx *sql.Tx) *mPlaceThingRepositoryMockUpdatePlace {
|
|
|
+func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Expect(ctx context.Context, req models.UpdatePlaceThingRequest) *mPlaceThingRepositoryMockUpdatePlace {
|
|
|
if mmUpdatePlace.mock.funcUpdatePlace != nil {
|
|
|
mmUpdatePlace.mock.t.Fatalf("PlaceThingRepositoryMock.UpdatePlace mock is already set by Set")
|
|
|
}
|
|
@@ -1151,7 +1092,7 @@ func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Expect(ctx context.Co
|
|
|
mmUpdatePlace.mock.t.Fatalf("PlaceThingRepositoryMock.UpdatePlace mock is already set by ExpectParams functions")
|
|
|
}
|
|
|
|
|
|
- mmUpdatePlace.defaultExpectation.params = &PlaceThingRepositoryMockUpdatePlaceParams{ctx, req, tx}
|
|
|
+ mmUpdatePlace.defaultExpectation.params = &PlaceThingRepositoryMockUpdatePlaceParams{ctx, req}
|
|
|
for _, e := range mmUpdatePlace.expectations {
|
|
|
if minimock.Equal(e.params, mmUpdatePlace.defaultExpectation.params) {
|
|
|
mmUpdatePlace.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmUpdatePlace.defaultExpectation.params)
|
|
@@ -1205,30 +1146,8 @@ func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) ExpectReqParam2(req m
|
|
|
return mmUpdatePlace
|
|
|
}
|
|
|
|
|
|
-// ExpectTxParam3 sets up expected param tx for PlaceThingRepository.UpdatePlace
|
|
|
-func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) ExpectTxParam3(tx *sql.Tx) *mPlaceThingRepositoryMockUpdatePlace {
|
|
|
- if mmUpdatePlace.mock.funcUpdatePlace != nil {
|
|
|
- mmUpdatePlace.mock.t.Fatalf("PlaceThingRepositoryMock.UpdatePlace mock is already set by Set")
|
|
|
- }
|
|
|
-
|
|
|
- if mmUpdatePlace.defaultExpectation == nil {
|
|
|
- mmUpdatePlace.defaultExpectation = &PlaceThingRepositoryMockUpdatePlaceExpectation{}
|
|
|
- }
|
|
|
-
|
|
|
- if mmUpdatePlace.defaultExpectation.params != nil {
|
|
|
- mmUpdatePlace.mock.t.Fatalf("PlaceThingRepositoryMock.UpdatePlace mock is already set by Expect")
|
|
|
- }
|
|
|
-
|
|
|
- if mmUpdatePlace.defaultExpectation.paramPtrs == nil {
|
|
|
- mmUpdatePlace.defaultExpectation.paramPtrs = &PlaceThingRepositoryMockUpdatePlaceParamPtrs{}
|
|
|
- }
|
|
|
- mmUpdatePlace.defaultExpectation.paramPtrs.tx = &tx
|
|
|
-
|
|
|
- return mmUpdatePlace
|
|
|
-}
|
|
|
-
|
|
|
// Inspect accepts an inspector function that has same arguments as the PlaceThingRepository.UpdatePlace
|
|
|
-func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Inspect(f func(ctx context.Context, req models.UpdatePlaceThingRequest, tx *sql.Tx)) *mPlaceThingRepositoryMockUpdatePlace {
|
|
|
+func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Inspect(f func(ctx context.Context, req models.UpdatePlaceThingRequest)) *mPlaceThingRepositoryMockUpdatePlace {
|
|
|
if mmUpdatePlace.mock.inspectFuncUpdatePlace != nil {
|
|
|
mmUpdatePlace.mock.t.Fatalf("Inspect function is already set for PlaceThingRepositoryMock.UpdatePlace")
|
|
|
}
|
|
@@ -1252,7 +1171,7 @@ func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Return(err error) *Pl
|
|
|
}
|
|
|
|
|
|
// Set uses given function f to mock the PlaceThingRepository.UpdatePlace method
|
|
|
-func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Set(f func(ctx context.Context, req models.UpdatePlaceThingRequest, tx *sql.Tx) (err error)) *PlaceThingRepositoryMock {
|
|
|
+func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Set(f func(ctx context.Context, req models.UpdatePlaceThingRequest) (err error)) *PlaceThingRepositoryMock {
|
|
|
if mmUpdatePlace.defaultExpectation != nil {
|
|
|
mmUpdatePlace.mock.t.Fatalf("Default expectation is already set for the PlaceThingRepository.UpdatePlace method")
|
|
|
}
|
|
@@ -1267,14 +1186,14 @@ func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) Set(f func(ctx contex
|
|
|
|
|
|
// When sets expectation for the PlaceThingRepository.UpdatePlace which will trigger the result defined by the following
|
|
|
// Then helper
|
|
|
-func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) When(ctx context.Context, req models.UpdatePlaceThingRequest, tx *sql.Tx) *PlaceThingRepositoryMockUpdatePlaceExpectation {
|
|
|
+func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) When(ctx context.Context, req models.UpdatePlaceThingRequest) *PlaceThingRepositoryMockUpdatePlaceExpectation {
|
|
|
if mmUpdatePlace.mock.funcUpdatePlace != nil {
|
|
|
mmUpdatePlace.mock.t.Fatalf("PlaceThingRepositoryMock.UpdatePlace mock is already set by Set")
|
|
|
}
|
|
|
|
|
|
expectation := &PlaceThingRepositoryMockUpdatePlaceExpectation{
|
|
|
mock: mmUpdatePlace.mock,
|
|
|
- params: &PlaceThingRepositoryMockUpdatePlaceParams{ctx, req, tx},
|
|
|
+ params: &PlaceThingRepositoryMockUpdatePlaceParams{ctx, req},
|
|
|
}
|
|
|
mmUpdatePlace.expectations = append(mmUpdatePlace.expectations, expectation)
|
|
|
return expectation
|
|
@@ -1307,15 +1226,15 @@ func (mmUpdatePlace *mPlaceThingRepositoryMockUpdatePlace) invocationsDone() boo
|
|
|
}
|
|
|
|
|
|
// UpdatePlace implements thing.PlaceThingRepository
|
|
|
-func (mmUpdatePlace *PlaceThingRepositoryMock) UpdatePlace(ctx context.Context, req models.UpdatePlaceThingRequest, tx *sql.Tx) (err error) {
|
|
|
+func (mmUpdatePlace *PlaceThingRepositoryMock) UpdatePlace(ctx context.Context, req models.UpdatePlaceThingRequest) (err error) {
|
|
|
mm_atomic.AddUint64(&mmUpdatePlace.beforeUpdatePlaceCounter, 1)
|
|
|
defer mm_atomic.AddUint64(&mmUpdatePlace.afterUpdatePlaceCounter, 1)
|
|
|
|
|
|
if mmUpdatePlace.inspectFuncUpdatePlace != nil {
|
|
|
- mmUpdatePlace.inspectFuncUpdatePlace(ctx, req, tx)
|
|
|
+ mmUpdatePlace.inspectFuncUpdatePlace(ctx, req)
|
|
|
}
|
|
|
|
|
|
- mm_params := PlaceThingRepositoryMockUpdatePlaceParams{ctx, req, tx}
|
|
|
+ mm_params := PlaceThingRepositoryMockUpdatePlaceParams{ctx, req}
|
|
|
|
|
|
// Record call args
|
|
|
mmUpdatePlace.UpdatePlaceMock.mutex.Lock()
|
|
@@ -1334,7 +1253,7 @@ func (mmUpdatePlace *PlaceThingRepositoryMock) UpdatePlace(ctx context.Context,
|
|
|
mm_want := mmUpdatePlace.UpdatePlaceMock.defaultExpectation.params
|
|
|
mm_want_ptrs := mmUpdatePlace.UpdatePlaceMock.defaultExpectation.paramPtrs
|
|
|
|
|
|
- mm_got := PlaceThingRepositoryMockUpdatePlaceParams{ctx, req, tx}
|
|
|
+ mm_got := PlaceThingRepositoryMockUpdatePlaceParams{ctx, req}
|
|
|
|
|
|
if mm_want_ptrs != nil {
|
|
|
|
|
@@ -1346,10 +1265,6 @@ func (mmUpdatePlace *PlaceThingRepositoryMock) UpdatePlace(ctx context.Context,
|
|
|
mmUpdatePlace.t.Errorf("PlaceThingRepositoryMock.UpdatePlace got unexpected parameter req, want: %#v, got: %#v%s\n", *mm_want_ptrs.req, mm_got.req, minimock.Diff(*mm_want_ptrs.req, mm_got.req))
|
|
|
}
|
|
|
|
|
|
- if mm_want_ptrs.tx != nil && !minimock.Equal(*mm_want_ptrs.tx, mm_got.tx) {
|
|
|
- mmUpdatePlace.t.Errorf("PlaceThingRepositoryMock.UpdatePlace got unexpected parameter tx, want: %#v, got: %#v%s\n", *mm_want_ptrs.tx, mm_got.tx, minimock.Diff(*mm_want_ptrs.tx, mm_got.tx))
|
|
|
- }
|
|
|
-
|
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
|
mmUpdatePlace.t.Errorf("PlaceThingRepositoryMock.UpdatePlace got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
|
}
|
|
@@ -1361,9 +1276,9 @@ func (mmUpdatePlace *PlaceThingRepositoryMock) UpdatePlace(ctx context.Context,
|
|
|
return (*mm_results).err
|
|
|
}
|
|
|
if mmUpdatePlace.funcUpdatePlace != nil {
|
|
|
- return mmUpdatePlace.funcUpdatePlace(ctx, req, tx)
|
|
|
+ return mmUpdatePlace.funcUpdatePlace(ctx, req)
|
|
|
}
|
|
|
- mmUpdatePlace.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.UpdatePlace. %v %v %v", ctx, req, tx)
|
|
|
+ mmUpdatePlace.t.Fatalf("Unexpected call to PlaceThingRepositoryMock.UpdatePlace. %v %v", ctx, req)
|
|
|
return
|
|
|
}
|
|
|
|