|
@@ -19,20 +19,20 @@ type ArticleRepositoryMock struct {
|
|
t minimock.Tester
|
|
t minimock.Tester
|
|
finishOnce sync.Once
|
|
finishOnce sync.Once
|
|
|
|
|
|
- funcGetAllPreview func(ctx context.Context) (aa1 []models.ArticlePreview, err error)
|
|
|
|
- inspectFuncGetAllPreview func(ctx context.Context)
|
|
|
|
|
|
+ funcGetAllPreview func(ctx context.Context, lang models.Language) (aa1 []models.ArticlePreview, err error)
|
|
|
|
+ inspectFuncGetAllPreview func(ctx context.Context, lang models.Language)
|
|
afterGetAllPreviewCounter uint64
|
|
afterGetAllPreviewCounter uint64
|
|
beforeGetAllPreviewCounter uint64
|
|
beforeGetAllPreviewCounter uint64
|
|
GetAllPreviewMock mArticleRepositoryMockGetAllPreview
|
|
GetAllPreviewMock mArticleRepositoryMockGetAllPreview
|
|
|
|
|
|
- funcGetByURL func(ctx context.Context, url string) (ap1 *models.Article, err error)
|
|
|
|
- inspectFuncGetByURL func(ctx context.Context, url string)
|
|
|
|
|
|
+ funcGetByURL func(ctx context.Context, url string, lang models.Language) (ap1 *models.Article, err error)
|
|
|
|
+ inspectFuncGetByURL func(ctx context.Context, url string, lang models.Language)
|
|
afterGetByURLCounter uint64
|
|
afterGetByURLCounter uint64
|
|
beforeGetByURLCounter uint64
|
|
beforeGetByURLCounter uint64
|
|
GetByURLMock mArticleRepositoryMockGetByURL
|
|
GetByURLMock mArticleRepositoryMockGetByURL
|
|
|
|
|
|
- funcGetPreviewByTagID func(ctx context.Context, tagID uint64) (aa1 []models.ArticlePreview, err error)
|
|
|
|
- inspectFuncGetPreviewByTagID func(ctx context.Context, tagID uint64)
|
|
|
|
|
|
+ funcGetPreviewByTagID func(ctx context.Context, tagID uint64, lang models.Language) (aa1 []models.ArticlePreview, err error)
|
|
|
|
+ inspectFuncGetPreviewByTagID func(ctx context.Context, tagID uint64, lang models.Language)
|
|
afterGetPreviewByTagIDCounter uint64
|
|
afterGetPreviewByTagIDCounter uint64
|
|
beforeGetPreviewByTagIDCounter uint64
|
|
beforeGetPreviewByTagIDCounter uint64
|
|
GetPreviewByTagIDMock mArticleRepositoryMockGetPreviewByTagID
|
|
GetPreviewByTagIDMock mArticleRepositoryMockGetPreviewByTagID
|
|
@@ -83,12 +83,14 @@ type ArticleRepositoryMockGetAllPreviewExpectation struct {
|
|
|
|
|
|
// ArticleRepositoryMockGetAllPreviewParams contains parameters of the ArticleRepository.GetAllPreview
|
|
// ArticleRepositoryMockGetAllPreviewParams contains parameters of the ArticleRepository.GetAllPreview
|
|
type ArticleRepositoryMockGetAllPreviewParams struct {
|
|
type ArticleRepositoryMockGetAllPreviewParams struct {
|
|
- ctx context.Context
|
|
|
|
|
|
+ ctx context.Context
|
|
|
|
+ lang models.Language
|
|
}
|
|
}
|
|
|
|
|
|
// ArticleRepositoryMockGetAllPreviewParamPtrs contains pointers to parameters of the ArticleRepository.GetAllPreview
|
|
// ArticleRepositoryMockGetAllPreviewParamPtrs contains pointers to parameters of the ArticleRepository.GetAllPreview
|
|
type ArticleRepositoryMockGetAllPreviewParamPtrs struct {
|
|
type ArticleRepositoryMockGetAllPreviewParamPtrs struct {
|
|
- ctx *context.Context
|
|
|
|
|
|
+ ctx *context.Context
|
|
|
|
+ lang *models.Language
|
|
}
|
|
}
|
|
|
|
|
|
// ArticleRepositoryMockGetAllPreviewResults contains results of the ArticleRepository.GetAllPreview
|
|
// ArticleRepositoryMockGetAllPreviewResults contains results of the ArticleRepository.GetAllPreview
|
|
@@ -108,7 +110,7 @@ func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Optional() *mArticle
|
|
}
|
|
}
|
|
|
|
|
|
// Expect sets up expected params for ArticleRepository.GetAllPreview
|
|
// Expect sets up expected params for ArticleRepository.GetAllPreview
|
|
-func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Expect(ctx context.Context) *mArticleRepositoryMockGetAllPreview {
|
|
|
|
|
|
+func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Expect(ctx context.Context, lang models.Language) *mArticleRepositoryMockGetAllPreview {
|
|
if mmGetAllPreview.mock.funcGetAllPreview != nil {
|
|
if mmGetAllPreview.mock.funcGetAllPreview != nil {
|
|
mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by Set")
|
|
mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by Set")
|
|
}
|
|
}
|
|
@@ -121,7 +123,7 @@ func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Expect(ctx context.C
|
|
mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by ExpectParams functions")
|
|
mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by ExpectParams functions")
|
|
}
|
|
}
|
|
|
|
|
|
- mmGetAllPreview.defaultExpectation.params = &ArticleRepositoryMockGetAllPreviewParams{ctx}
|
|
|
|
|
|
+ mmGetAllPreview.defaultExpectation.params = &ArticleRepositoryMockGetAllPreviewParams{ctx, lang}
|
|
for _, e := range mmGetAllPreview.expectations {
|
|
for _, e := range mmGetAllPreview.expectations {
|
|
if minimock.Equal(e.params, mmGetAllPreview.defaultExpectation.params) {
|
|
if minimock.Equal(e.params, mmGetAllPreview.defaultExpectation.params) {
|
|
mmGetAllPreview.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetAllPreview.defaultExpectation.params)
|
|
mmGetAllPreview.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetAllPreview.defaultExpectation.params)
|
|
@@ -153,8 +155,30 @@ func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) ExpectCtxParam1(ctx
|
|
return mmGetAllPreview
|
|
return mmGetAllPreview
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ExpectLangParam2 sets up expected param lang for ArticleRepository.GetAllPreview
|
|
|
|
+func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) ExpectLangParam2(lang models.Language) *mArticleRepositoryMockGetAllPreview {
|
|
|
|
+ if mmGetAllPreview.mock.funcGetAllPreview != nil {
|
|
|
|
+ mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by Set")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetAllPreview.defaultExpectation == nil {
|
|
|
|
+ mmGetAllPreview.defaultExpectation = &ArticleRepositoryMockGetAllPreviewExpectation{}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetAllPreview.defaultExpectation.params != nil {
|
|
|
|
+ mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by Expect")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetAllPreview.defaultExpectation.paramPtrs == nil {
|
|
|
|
+ mmGetAllPreview.defaultExpectation.paramPtrs = &ArticleRepositoryMockGetAllPreviewParamPtrs{}
|
|
|
|
+ }
|
|
|
|
+ mmGetAllPreview.defaultExpectation.paramPtrs.lang = &lang
|
|
|
|
+
|
|
|
|
+ return mmGetAllPreview
|
|
|
|
+}
|
|
|
|
+
|
|
// Inspect accepts an inspector function that has same arguments as the ArticleRepository.GetAllPreview
|
|
// Inspect accepts an inspector function that has same arguments as the ArticleRepository.GetAllPreview
|
|
-func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Inspect(f func(ctx context.Context)) *mArticleRepositoryMockGetAllPreview {
|
|
|
|
|
|
+func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Inspect(f func(ctx context.Context, lang models.Language)) *mArticleRepositoryMockGetAllPreview {
|
|
if mmGetAllPreview.mock.inspectFuncGetAllPreview != nil {
|
|
if mmGetAllPreview.mock.inspectFuncGetAllPreview != nil {
|
|
mmGetAllPreview.mock.t.Fatalf("Inspect function is already set for ArticleRepositoryMock.GetAllPreview")
|
|
mmGetAllPreview.mock.t.Fatalf("Inspect function is already set for ArticleRepositoryMock.GetAllPreview")
|
|
}
|
|
}
|
|
@@ -178,7 +202,7 @@ func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Return(aa1 []models.
|
|
}
|
|
}
|
|
|
|
|
|
// Set uses given function f to mock the ArticleRepository.GetAllPreview method
|
|
// Set uses given function f to mock the ArticleRepository.GetAllPreview method
|
|
-func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Set(f func(ctx context.Context) (aa1 []models.ArticlePreview, err error)) *ArticleRepositoryMock {
|
|
|
|
|
|
+func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Set(f func(ctx context.Context, lang models.Language) (aa1 []models.ArticlePreview, err error)) *ArticleRepositoryMock {
|
|
if mmGetAllPreview.defaultExpectation != nil {
|
|
if mmGetAllPreview.defaultExpectation != nil {
|
|
mmGetAllPreview.mock.t.Fatalf("Default expectation is already set for the ArticleRepository.GetAllPreview method")
|
|
mmGetAllPreview.mock.t.Fatalf("Default expectation is already set for the ArticleRepository.GetAllPreview method")
|
|
}
|
|
}
|
|
@@ -193,14 +217,14 @@ func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) Set(f func(ctx conte
|
|
|
|
|
|
// When sets expectation for the ArticleRepository.GetAllPreview which will trigger the result defined by the following
|
|
// When sets expectation for the ArticleRepository.GetAllPreview which will trigger the result defined by the following
|
|
// Then helper
|
|
// Then helper
|
|
-func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) When(ctx context.Context) *ArticleRepositoryMockGetAllPreviewExpectation {
|
|
|
|
|
|
+func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) When(ctx context.Context, lang models.Language) *ArticleRepositoryMockGetAllPreviewExpectation {
|
|
if mmGetAllPreview.mock.funcGetAllPreview != nil {
|
|
if mmGetAllPreview.mock.funcGetAllPreview != nil {
|
|
mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by Set")
|
|
mmGetAllPreview.mock.t.Fatalf("ArticleRepositoryMock.GetAllPreview mock is already set by Set")
|
|
}
|
|
}
|
|
|
|
|
|
expectation := &ArticleRepositoryMockGetAllPreviewExpectation{
|
|
expectation := &ArticleRepositoryMockGetAllPreviewExpectation{
|
|
mock: mmGetAllPreview.mock,
|
|
mock: mmGetAllPreview.mock,
|
|
- params: &ArticleRepositoryMockGetAllPreviewParams{ctx},
|
|
|
|
|
|
+ params: &ArticleRepositoryMockGetAllPreviewParams{ctx, lang},
|
|
}
|
|
}
|
|
mmGetAllPreview.expectations = append(mmGetAllPreview.expectations, expectation)
|
|
mmGetAllPreview.expectations = append(mmGetAllPreview.expectations, expectation)
|
|
return expectation
|
|
return expectation
|
|
@@ -233,15 +257,15 @@ func (mmGetAllPreview *mArticleRepositoryMockGetAllPreview) invocationsDone() bo
|
|
}
|
|
}
|
|
|
|
|
|
// GetAllPreview implements handler.ArticleRepository
|
|
// GetAllPreview implements handler.ArticleRepository
|
|
-func (mmGetAllPreview *ArticleRepositoryMock) GetAllPreview(ctx context.Context) (aa1 []models.ArticlePreview, err error) {
|
|
|
|
|
|
+func (mmGetAllPreview *ArticleRepositoryMock) GetAllPreview(ctx context.Context, lang models.Language) (aa1 []models.ArticlePreview, err error) {
|
|
mm_atomic.AddUint64(&mmGetAllPreview.beforeGetAllPreviewCounter, 1)
|
|
mm_atomic.AddUint64(&mmGetAllPreview.beforeGetAllPreviewCounter, 1)
|
|
defer mm_atomic.AddUint64(&mmGetAllPreview.afterGetAllPreviewCounter, 1)
|
|
defer mm_atomic.AddUint64(&mmGetAllPreview.afterGetAllPreviewCounter, 1)
|
|
|
|
|
|
if mmGetAllPreview.inspectFuncGetAllPreview != nil {
|
|
if mmGetAllPreview.inspectFuncGetAllPreview != nil {
|
|
- mmGetAllPreview.inspectFuncGetAllPreview(ctx)
|
|
|
|
|
|
+ mmGetAllPreview.inspectFuncGetAllPreview(ctx, lang)
|
|
}
|
|
}
|
|
|
|
|
|
- mm_params := ArticleRepositoryMockGetAllPreviewParams{ctx}
|
|
|
|
|
|
+ mm_params := ArticleRepositoryMockGetAllPreviewParams{ctx, lang}
|
|
|
|
|
|
// Record call args
|
|
// Record call args
|
|
mmGetAllPreview.GetAllPreviewMock.mutex.Lock()
|
|
mmGetAllPreview.GetAllPreviewMock.mutex.Lock()
|
|
@@ -260,7 +284,7 @@ func (mmGetAllPreview *ArticleRepositoryMock) GetAllPreview(ctx context.Context)
|
|
mm_want := mmGetAllPreview.GetAllPreviewMock.defaultExpectation.params
|
|
mm_want := mmGetAllPreview.GetAllPreviewMock.defaultExpectation.params
|
|
mm_want_ptrs := mmGetAllPreview.GetAllPreviewMock.defaultExpectation.paramPtrs
|
|
mm_want_ptrs := mmGetAllPreview.GetAllPreviewMock.defaultExpectation.paramPtrs
|
|
|
|
|
|
- mm_got := ArticleRepositoryMockGetAllPreviewParams{ctx}
|
|
|
|
|
|
+ mm_got := ArticleRepositoryMockGetAllPreviewParams{ctx, lang}
|
|
|
|
|
|
if mm_want_ptrs != nil {
|
|
if mm_want_ptrs != nil {
|
|
|
|
|
|
@@ -268,6 +292,10 @@ func (mmGetAllPreview *ArticleRepositoryMock) GetAllPreview(ctx context.Context)
|
|
mmGetAllPreview.t.Errorf("ArticleRepositoryMock.GetAllPreview 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))
|
|
mmGetAllPreview.t.Errorf("ArticleRepositoryMock.GetAllPreview 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.lang != nil && !minimock.Equal(*mm_want_ptrs.lang, mm_got.lang) {
|
|
|
|
+ mmGetAllPreview.t.Errorf("ArticleRepositoryMock.GetAllPreview got unexpected parameter lang, want: %#v, got: %#v%s\n", *mm_want_ptrs.lang, mm_got.lang, minimock.Diff(*mm_want_ptrs.lang, mm_got.lang))
|
|
|
|
+ }
|
|
|
|
+
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
mmGetAllPreview.t.Errorf("ArticleRepositoryMock.GetAllPreview got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
mmGetAllPreview.t.Errorf("ArticleRepositoryMock.GetAllPreview got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
}
|
|
}
|
|
@@ -279,9 +307,9 @@ func (mmGetAllPreview *ArticleRepositoryMock) GetAllPreview(ctx context.Context)
|
|
return (*mm_results).aa1, (*mm_results).err
|
|
return (*mm_results).aa1, (*mm_results).err
|
|
}
|
|
}
|
|
if mmGetAllPreview.funcGetAllPreview != nil {
|
|
if mmGetAllPreview.funcGetAllPreview != nil {
|
|
- return mmGetAllPreview.funcGetAllPreview(ctx)
|
|
|
|
|
|
+ return mmGetAllPreview.funcGetAllPreview(ctx, lang)
|
|
}
|
|
}
|
|
- mmGetAllPreview.t.Fatalf("Unexpected call to ArticleRepositoryMock.GetAllPreview. %v", ctx)
|
|
|
|
|
|
+ mmGetAllPreview.t.Fatalf("Unexpected call to ArticleRepositoryMock.GetAllPreview. %v %v", ctx, lang)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -376,14 +404,16 @@ type ArticleRepositoryMockGetByURLExpectation struct {
|
|
|
|
|
|
// ArticleRepositoryMockGetByURLParams contains parameters of the ArticleRepository.GetByURL
|
|
// ArticleRepositoryMockGetByURLParams contains parameters of the ArticleRepository.GetByURL
|
|
type ArticleRepositoryMockGetByURLParams struct {
|
|
type ArticleRepositoryMockGetByURLParams struct {
|
|
- ctx context.Context
|
|
|
|
- url string
|
|
|
|
|
|
+ ctx context.Context
|
|
|
|
+ url string
|
|
|
|
+ lang models.Language
|
|
}
|
|
}
|
|
|
|
|
|
// ArticleRepositoryMockGetByURLParamPtrs contains pointers to parameters of the ArticleRepository.GetByURL
|
|
// ArticleRepositoryMockGetByURLParamPtrs contains pointers to parameters of the ArticleRepository.GetByURL
|
|
type ArticleRepositoryMockGetByURLParamPtrs struct {
|
|
type ArticleRepositoryMockGetByURLParamPtrs struct {
|
|
- ctx *context.Context
|
|
|
|
- url *string
|
|
|
|
|
|
+ ctx *context.Context
|
|
|
|
+ url *string
|
|
|
|
+ lang *models.Language
|
|
}
|
|
}
|
|
|
|
|
|
// ArticleRepositoryMockGetByURLResults contains results of the ArticleRepository.GetByURL
|
|
// ArticleRepositoryMockGetByURLResults contains results of the ArticleRepository.GetByURL
|
|
@@ -403,7 +433,7 @@ func (mmGetByURL *mArticleRepositoryMockGetByURL) Optional() *mArticleRepository
|
|
}
|
|
}
|
|
|
|
|
|
// Expect sets up expected params for ArticleRepository.GetByURL
|
|
// Expect sets up expected params for ArticleRepository.GetByURL
|
|
-func (mmGetByURL *mArticleRepositoryMockGetByURL) Expect(ctx context.Context, url string) *mArticleRepositoryMockGetByURL {
|
|
|
|
|
|
+func (mmGetByURL *mArticleRepositoryMockGetByURL) Expect(ctx context.Context, url string, lang models.Language) *mArticleRepositoryMockGetByURL {
|
|
if mmGetByURL.mock.funcGetByURL != nil {
|
|
if mmGetByURL.mock.funcGetByURL != nil {
|
|
mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by Set")
|
|
mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by Set")
|
|
}
|
|
}
|
|
@@ -416,7 +446,7 @@ func (mmGetByURL *mArticleRepositoryMockGetByURL) Expect(ctx context.Context, ur
|
|
mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by ExpectParams functions")
|
|
mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by ExpectParams functions")
|
|
}
|
|
}
|
|
|
|
|
|
- mmGetByURL.defaultExpectation.params = &ArticleRepositoryMockGetByURLParams{ctx, url}
|
|
|
|
|
|
+ mmGetByURL.defaultExpectation.params = &ArticleRepositoryMockGetByURLParams{ctx, url, lang}
|
|
for _, e := range mmGetByURL.expectations {
|
|
for _, e := range mmGetByURL.expectations {
|
|
if minimock.Equal(e.params, mmGetByURL.defaultExpectation.params) {
|
|
if minimock.Equal(e.params, mmGetByURL.defaultExpectation.params) {
|
|
mmGetByURL.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetByURL.defaultExpectation.params)
|
|
mmGetByURL.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetByURL.defaultExpectation.params)
|
|
@@ -470,8 +500,30 @@ func (mmGetByURL *mArticleRepositoryMockGetByURL) ExpectUrlParam2(url string) *m
|
|
return mmGetByURL
|
|
return mmGetByURL
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ExpectLangParam3 sets up expected param lang for ArticleRepository.GetByURL
|
|
|
|
+func (mmGetByURL *mArticleRepositoryMockGetByURL) ExpectLangParam3(lang models.Language) *mArticleRepositoryMockGetByURL {
|
|
|
|
+ if mmGetByURL.mock.funcGetByURL != nil {
|
|
|
|
+ mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by Set")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetByURL.defaultExpectation == nil {
|
|
|
|
+ mmGetByURL.defaultExpectation = &ArticleRepositoryMockGetByURLExpectation{}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetByURL.defaultExpectation.params != nil {
|
|
|
|
+ mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by Expect")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetByURL.defaultExpectation.paramPtrs == nil {
|
|
|
|
+ mmGetByURL.defaultExpectation.paramPtrs = &ArticleRepositoryMockGetByURLParamPtrs{}
|
|
|
|
+ }
|
|
|
|
+ mmGetByURL.defaultExpectation.paramPtrs.lang = &lang
|
|
|
|
+
|
|
|
|
+ return mmGetByURL
|
|
|
|
+}
|
|
|
|
+
|
|
// Inspect accepts an inspector function that has same arguments as the ArticleRepository.GetByURL
|
|
// Inspect accepts an inspector function that has same arguments as the ArticleRepository.GetByURL
|
|
-func (mmGetByURL *mArticleRepositoryMockGetByURL) Inspect(f func(ctx context.Context, url string)) *mArticleRepositoryMockGetByURL {
|
|
|
|
|
|
+func (mmGetByURL *mArticleRepositoryMockGetByURL) Inspect(f func(ctx context.Context, url string, lang models.Language)) *mArticleRepositoryMockGetByURL {
|
|
if mmGetByURL.mock.inspectFuncGetByURL != nil {
|
|
if mmGetByURL.mock.inspectFuncGetByURL != nil {
|
|
mmGetByURL.mock.t.Fatalf("Inspect function is already set for ArticleRepositoryMock.GetByURL")
|
|
mmGetByURL.mock.t.Fatalf("Inspect function is already set for ArticleRepositoryMock.GetByURL")
|
|
}
|
|
}
|
|
@@ -495,7 +547,7 @@ func (mmGetByURL *mArticleRepositoryMockGetByURL) Return(ap1 *models.Article, er
|
|
}
|
|
}
|
|
|
|
|
|
// Set uses given function f to mock the ArticleRepository.GetByURL method
|
|
// Set uses given function f to mock the ArticleRepository.GetByURL method
|
|
-func (mmGetByURL *mArticleRepositoryMockGetByURL) Set(f func(ctx context.Context, url string) (ap1 *models.Article, err error)) *ArticleRepositoryMock {
|
|
|
|
|
|
+func (mmGetByURL *mArticleRepositoryMockGetByURL) Set(f func(ctx context.Context, url string, lang models.Language) (ap1 *models.Article, err error)) *ArticleRepositoryMock {
|
|
if mmGetByURL.defaultExpectation != nil {
|
|
if mmGetByURL.defaultExpectation != nil {
|
|
mmGetByURL.mock.t.Fatalf("Default expectation is already set for the ArticleRepository.GetByURL method")
|
|
mmGetByURL.mock.t.Fatalf("Default expectation is already set for the ArticleRepository.GetByURL method")
|
|
}
|
|
}
|
|
@@ -510,14 +562,14 @@ func (mmGetByURL *mArticleRepositoryMockGetByURL) Set(f func(ctx context.Context
|
|
|
|
|
|
// When sets expectation for the ArticleRepository.GetByURL which will trigger the result defined by the following
|
|
// When sets expectation for the ArticleRepository.GetByURL which will trigger the result defined by the following
|
|
// Then helper
|
|
// Then helper
|
|
-func (mmGetByURL *mArticleRepositoryMockGetByURL) When(ctx context.Context, url string) *ArticleRepositoryMockGetByURLExpectation {
|
|
|
|
|
|
+func (mmGetByURL *mArticleRepositoryMockGetByURL) When(ctx context.Context, url string, lang models.Language) *ArticleRepositoryMockGetByURLExpectation {
|
|
if mmGetByURL.mock.funcGetByURL != nil {
|
|
if mmGetByURL.mock.funcGetByURL != nil {
|
|
mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by Set")
|
|
mmGetByURL.mock.t.Fatalf("ArticleRepositoryMock.GetByURL mock is already set by Set")
|
|
}
|
|
}
|
|
|
|
|
|
expectation := &ArticleRepositoryMockGetByURLExpectation{
|
|
expectation := &ArticleRepositoryMockGetByURLExpectation{
|
|
mock: mmGetByURL.mock,
|
|
mock: mmGetByURL.mock,
|
|
- params: &ArticleRepositoryMockGetByURLParams{ctx, url},
|
|
|
|
|
|
+ params: &ArticleRepositoryMockGetByURLParams{ctx, url, lang},
|
|
}
|
|
}
|
|
mmGetByURL.expectations = append(mmGetByURL.expectations, expectation)
|
|
mmGetByURL.expectations = append(mmGetByURL.expectations, expectation)
|
|
return expectation
|
|
return expectation
|
|
@@ -550,15 +602,15 @@ func (mmGetByURL *mArticleRepositoryMockGetByURL) invocationsDone() bool {
|
|
}
|
|
}
|
|
|
|
|
|
// GetByURL implements handler.ArticleRepository
|
|
// GetByURL implements handler.ArticleRepository
|
|
-func (mmGetByURL *ArticleRepositoryMock) GetByURL(ctx context.Context, url string) (ap1 *models.Article, err error) {
|
|
|
|
|
|
+func (mmGetByURL *ArticleRepositoryMock) GetByURL(ctx context.Context, url string, lang models.Language) (ap1 *models.Article, err error) {
|
|
mm_atomic.AddUint64(&mmGetByURL.beforeGetByURLCounter, 1)
|
|
mm_atomic.AddUint64(&mmGetByURL.beforeGetByURLCounter, 1)
|
|
defer mm_atomic.AddUint64(&mmGetByURL.afterGetByURLCounter, 1)
|
|
defer mm_atomic.AddUint64(&mmGetByURL.afterGetByURLCounter, 1)
|
|
|
|
|
|
if mmGetByURL.inspectFuncGetByURL != nil {
|
|
if mmGetByURL.inspectFuncGetByURL != nil {
|
|
- mmGetByURL.inspectFuncGetByURL(ctx, url)
|
|
|
|
|
|
+ mmGetByURL.inspectFuncGetByURL(ctx, url, lang)
|
|
}
|
|
}
|
|
|
|
|
|
- mm_params := ArticleRepositoryMockGetByURLParams{ctx, url}
|
|
|
|
|
|
+ mm_params := ArticleRepositoryMockGetByURLParams{ctx, url, lang}
|
|
|
|
|
|
// Record call args
|
|
// Record call args
|
|
mmGetByURL.GetByURLMock.mutex.Lock()
|
|
mmGetByURL.GetByURLMock.mutex.Lock()
|
|
@@ -577,7 +629,7 @@ func (mmGetByURL *ArticleRepositoryMock) GetByURL(ctx context.Context, url strin
|
|
mm_want := mmGetByURL.GetByURLMock.defaultExpectation.params
|
|
mm_want := mmGetByURL.GetByURLMock.defaultExpectation.params
|
|
mm_want_ptrs := mmGetByURL.GetByURLMock.defaultExpectation.paramPtrs
|
|
mm_want_ptrs := mmGetByURL.GetByURLMock.defaultExpectation.paramPtrs
|
|
|
|
|
|
- mm_got := ArticleRepositoryMockGetByURLParams{ctx, url}
|
|
|
|
|
|
+ mm_got := ArticleRepositoryMockGetByURLParams{ctx, url, lang}
|
|
|
|
|
|
if mm_want_ptrs != nil {
|
|
if mm_want_ptrs != nil {
|
|
|
|
|
|
@@ -589,6 +641,10 @@ func (mmGetByURL *ArticleRepositoryMock) GetByURL(ctx context.Context, url strin
|
|
mmGetByURL.t.Errorf("ArticleRepositoryMock.GetByURL got unexpected parameter url, want: %#v, got: %#v%s\n", *mm_want_ptrs.url, mm_got.url, minimock.Diff(*mm_want_ptrs.url, mm_got.url))
|
|
mmGetByURL.t.Errorf("ArticleRepositoryMock.GetByURL got unexpected parameter url, want: %#v, got: %#v%s\n", *mm_want_ptrs.url, mm_got.url, minimock.Diff(*mm_want_ptrs.url, mm_got.url))
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if mm_want_ptrs.lang != nil && !minimock.Equal(*mm_want_ptrs.lang, mm_got.lang) {
|
|
|
|
+ mmGetByURL.t.Errorf("ArticleRepositoryMock.GetByURL got unexpected parameter lang, want: %#v, got: %#v%s\n", *mm_want_ptrs.lang, mm_got.lang, minimock.Diff(*mm_want_ptrs.lang, mm_got.lang))
|
|
|
|
+ }
|
|
|
|
+
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
mmGetByURL.t.Errorf("ArticleRepositoryMock.GetByURL got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
mmGetByURL.t.Errorf("ArticleRepositoryMock.GetByURL got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
}
|
|
}
|
|
@@ -600,9 +656,9 @@ func (mmGetByURL *ArticleRepositoryMock) GetByURL(ctx context.Context, url strin
|
|
return (*mm_results).ap1, (*mm_results).err
|
|
return (*mm_results).ap1, (*mm_results).err
|
|
}
|
|
}
|
|
if mmGetByURL.funcGetByURL != nil {
|
|
if mmGetByURL.funcGetByURL != nil {
|
|
- return mmGetByURL.funcGetByURL(ctx, url)
|
|
|
|
|
|
+ return mmGetByURL.funcGetByURL(ctx, url, lang)
|
|
}
|
|
}
|
|
- mmGetByURL.t.Fatalf("Unexpected call to ArticleRepositoryMock.GetByURL. %v %v", ctx, url)
|
|
|
|
|
|
+ mmGetByURL.t.Fatalf("Unexpected call to ArticleRepositoryMock.GetByURL. %v %v %v", ctx, url, lang)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -699,12 +755,14 @@ type ArticleRepositoryMockGetPreviewByTagIDExpectation struct {
|
|
type ArticleRepositoryMockGetPreviewByTagIDParams struct {
|
|
type ArticleRepositoryMockGetPreviewByTagIDParams struct {
|
|
ctx context.Context
|
|
ctx context.Context
|
|
tagID uint64
|
|
tagID uint64
|
|
|
|
+ lang models.Language
|
|
}
|
|
}
|
|
|
|
|
|
// ArticleRepositoryMockGetPreviewByTagIDParamPtrs contains pointers to parameters of the ArticleRepository.GetPreviewByTagID
|
|
// ArticleRepositoryMockGetPreviewByTagIDParamPtrs contains pointers to parameters of the ArticleRepository.GetPreviewByTagID
|
|
type ArticleRepositoryMockGetPreviewByTagIDParamPtrs struct {
|
|
type ArticleRepositoryMockGetPreviewByTagIDParamPtrs struct {
|
|
ctx *context.Context
|
|
ctx *context.Context
|
|
tagID *uint64
|
|
tagID *uint64
|
|
|
|
+ lang *models.Language
|
|
}
|
|
}
|
|
|
|
|
|
// ArticleRepositoryMockGetPreviewByTagIDResults contains results of the ArticleRepository.GetPreviewByTagID
|
|
// ArticleRepositoryMockGetPreviewByTagIDResults contains results of the ArticleRepository.GetPreviewByTagID
|
|
@@ -724,7 +782,7 @@ func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Optional() *
|
|
}
|
|
}
|
|
|
|
|
|
// Expect sets up expected params for ArticleRepository.GetPreviewByTagID
|
|
// Expect sets up expected params for ArticleRepository.GetPreviewByTagID
|
|
-func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Expect(ctx context.Context, tagID uint64) *mArticleRepositoryMockGetPreviewByTagID {
|
|
|
|
|
|
+func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Expect(ctx context.Context, tagID uint64, lang models.Language) *mArticleRepositoryMockGetPreviewByTagID {
|
|
if mmGetPreviewByTagID.mock.funcGetPreviewByTagID != nil {
|
|
if mmGetPreviewByTagID.mock.funcGetPreviewByTagID != nil {
|
|
mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by Set")
|
|
mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by Set")
|
|
}
|
|
}
|
|
@@ -737,7 +795,7 @@ func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Expect(ctx c
|
|
mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by ExpectParams functions")
|
|
mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by ExpectParams functions")
|
|
}
|
|
}
|
|
|
|
|
|
- mmGetPreviewByTagID.defaultExpectation.params = &ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID}
|
|
|
|
|
|
+ mmGetPreviewByTagID.defaultExpectation.params = &ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID, lang}
|
|
for _, e := range mmGetPreviewByTagID.expectations {
|
|
for _, e := range mmGetPreviewByTagID.expectations {
|
|
if minimock.Equal(e.params, mmGetPreviewByTagID.defaultExpectation.params) {
|
|
if minimock.Equal(e.params, mmGetPreviewByTagID.defaultExpectation.params) {
|
|
mmGetPreviewByTagID.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetPreviewByTagID.defaultExpectation.params)
|
|
mmGetPreviewByTagID.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmGetPreviewByTagID.defaultExpectation.params)
|
|
@@ -791,8 +849,30 @@ func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) ExpectTagIDP
|
|
return mmGetPreviewByTagID
|
|
return mmGetPreviewByTagID
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ExpectLangParam3 sets up expected param lang for ArticleRepository.GetPreviewByTagID
|
|
|
|
+func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) ExpectLangParam3(lang models.Language) *mArticleRepositoryMockGetPreviewByTagID {
|
|
|
|
+ if mmGetPreviewByTagID.mock.funcGetPreviewByTagID != nil {
|
|
|
|
+ mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by Set")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetPreviewByTagID.defaultExpectation == nil {
|
|
|
|
+ mmGetPreviewByTagID.defaultExpectation = &ArticleRepositoryMockGetPreviewByTagIDExpectation{}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetPreviewByTagID.defaultExpectation.params != nil {
|
|
|
|
+ mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by Expect")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if mmGetPreviewByTagID.defaultExpectation.paramPtrs == nil {
|
|
|
|
+ mmGetPreviewByTagID.defaultExpectation.paramPtrs = &ArticleRepositoryMockGetPreviewByTagIDParamPtrs{}
|
|
|
|
+ }
|
|
|
|
+ mmGetPreviewByTagID.defaultExpectation.paramPtrs.lang = &lang
|
|
|
|
+
|
|
|
|
+ return mmGetPreviewByTagID
|
|
|
|
+}
|
|
|
|
+
|
|
// Inspect accepts an inspector function that has same arguments as the ArticleRepository.GetPreviewByTagID
|
|
// Inspect accepts an inspector function that has same arguments as the ArticleRepository.GetPreviewByTagID
|
|
-func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Inspect(f func(ctx context.Context, tagID uint64)) *mArticleRepositoryMockGetPreviewByTagID {
|
|
|
|
|
|
+func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Inspect(f func(ctx context.Context, tagID uint64, lang models.Language)) *mArticleRepositoryMockGetPreviewByTagID {
|
|
if mmGetPreviewByTagID.mock.inspectFuncGetPreviewByTagID != nil {
|
|
if mmGetPreviewByTagID.mock.inspectFuncGetPreviewByTagID != nil {
|
|
mmGetPreviewByTagID.mock.t.Fatalf("Inspect function is already set for ArticleRepositoryMock.GetPreviewByTagID")
|
|
mmGetPreviewByTagID.mock.t.Fatalf("Inspect function is already set for ArticleRepositoryMock.GetPreviewByTagID")
|
|
}
|
|
}
|
|
@@ -816,7 +896,7 @@ func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Return(aa1 [
|
|
}
|
|
}
|
|
|
|
|
|
// Set uses given function f to mock the ArticleRepository.GetPreviewByTagID method
|
|
// Set uses given function f to mock the ArticleRepository.GetPreviewByTagID method
|
|
-func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Set(f func(ctx context.Context, tagID uint64) (aa1 []models.ArticlePreview, err error)) *ArticleRepositoryMock {
|
|
|
|
|
|
+func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Set(f func(ctx context.Context, tagID uint64, lang models.Language) (aa1 []models.ArticlePreview, err error)) *ArticleRepositoryMock {
|
|
if mmGetPreviewByTagID.defaultExpectation != nil {
|
|
if mmGetPreviewByTagID.defaultExpectation != nil {
|
|
mmGetPreviewByTagID.mock.t.Fatalf("Default expectation is already set for the ArticleRepository.GetPreviewByTagID method")
|
|
mmGetPreviewByTagID.mock.t.Fatalf("Default expectation is already set for the ArticleRepository.GetPreviewByTagID method")
|
|
}
|
|
}
|
|
@@ -831,14 +911,14 @@ func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) Set(f func(c
|
|
|
|
|
|
// When sets expectation for the ArticleRepository.GetPreviewByTagID which will trigger the result defined by the following
|
|
// When sets expectation for the ArticleRepository.GetPreviewByTagID which will trigger the result defined by the following
|
|
// Then helper
|
|
// Then helper
|
|
-func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) When(ctx context.Context, tagID uint64) *ArticleRepositoryMockGetPreviewByTagIDExpectation {
|
|
|
|
|
|
+func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) When(ctx context.Context, tagID uint64, lang models.Language) *ArticleRepositoryMockGetPreviewByTagIDExpectation {
|
|
if mmGetPreviewByTagID.mock.funcGetPreviewByTagID != nil {
|
|
if mmGetPreviewByTagID.mock.funcGetPreviewByTagID != nil {
|
|
mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by Set")
|
|
mmGetPreviewByTagID.mock.t.Fatalf("ArticleRepositoryMock.GetPreviewByTagID mock is already set by Set")
|
|
}
|
|
}
|
|
|
|
|
|
expectation := &ArticleRepositoryMockGetPreviewByTagIDExpectation{
|
|
expectation := &ArticleRepositoryMockGetPreviewByTagIDExpectation{
|
|
mock: mmGetPreviewByTagID.mock,
|
|
mock: mmGetPreviewByTagID.mock,
|
|
- params: &ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID},
|
|
|
|
|
|
+ params: &ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID, lang},
|
|
}
|
|
}
|
|
mmGetPreviewByTagID.expectations = append(mmGetPreviewByTagID.expectations, expectation)
|
|
mmGetPreviewByTagID.expectations = append(mmGetPreviewByTagID.expectations, expectation)
|
|
return expectation
|
|
return expectation
|
|
@@ -871,15 +951,15 @@ func (mmGetPreviewByTagID *mArticleRepositoryMockGetPreviewByTagID) invocationsD
|
|
}
|
|
}
|
|
|
|
|
|
// GetPreviewByTagID implements handler.ArticleRepository
|
|
// GetPreviewByTagID implements handler.ArticleRepository
|
|
-func (mmGetPreviewByTagID *ArticleRepositoryMock) GetPreviewByTagID(ctx context.Context, tagID uint64) (aa1 []models.ArticlePreview, err error) {
|
|
|
|
|
|
+func (mmGetPreviewByTagID *ArticleRepositoryMock) GetPreviewByTagID(ctx context.Context, tagID uint64, lang models.Language) (aa1 []models.ArticlePreview, err error) {
|
|
mm_atomic.AddUint64(&mmGetPreviewByTagID.beforeGetPreviewByTagIDCounter, 1)
|
|
mm_atomic.AddUint64(&mmGetPreviewByTagID.beforeGetPreviewByTagIDCounter, 1)
|
|
defer mm_atomic.AddUint64(&mmGetPreviewByTagID.afterGetPreviewByTagIDCounter, 1)
|
|
defer mm_atomic.AddUint64(&mmGetPreviewByTagID.afterGetPreviewByTagIDCounter, 1)
|
|
|
|
|
|
if mmGetPreviewByTagID.inspectFuncGetPreviewByTagID != nil {
|
|
if mmGetPreviewByTagID.inspectFuncGetPreviewByTagID != nil {
|
|
- mmGetPreviewByTagID.inspectFuncGetPreviewByTagID(ctx, tagID)
|
|
|
|
|
|
+ mmGetPreviewByTagID.inspectFuncGetPreviewByTagID(ctx, tagID, lang)
|
|
}
|
|
}
|
|
|
|
|
|
- mm_params := ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID}
|
|
|
|
|
|
+ mm_params := ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID, lang}
|
|
|
|
|
|
// Record call args
|
|
// Record call args
|
|
mmGetPreviewByTagID.GetPreviewByTagIDMock.mutex.Lock()
|
|
mmGetPreviewByTagID.GetPreviewByTagIDMock.mutex.Lock()
|
|
@@ -898,7 +978,7 @@ func (mmGetPreviewByTagID *ArticleRepositoryMock) GetPreviewByTagID(ctx context.
|
|
mm_want := mmGetPreviewByTagID.GetPreviewByTagIDMock.defaultExpectation.params
|
|
mm_want := mmGetPreviewByTagID.GetPreviewByTagIDMock.defaultExpectation.params
|
|
mm_want_ptrs := mmGetPreviewByTagID.GetPreviewByTagIDMock.defaultExpectation.paramPtrs
|
|
mm_want_ptrs := mmGetPreviewByTagID.GetPreviewByTagIDMock.defaultExpectation.paramPtrs
|
|
|
|
|
|
- mm_got := ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID}
|
|
|
|
|
|
+ mm_got := ArticleRepositoryMockGetPreviewByTagIDParams{ctx, tagID, lang}
|
|
|
|
|
|
if mm_want_ptrs != nil {
|
|
if mm_want_ptrs != nil {
|
|
|
|
|
|
@@ -910,6 +990,10 @@ func (mmGetPreviewByTagID *ArticleRepositoryMock) GetPreviewByTagID(ctx context.
|
|
mmGetPreviewByTagID.t.Errorf("ArticleRepositoryMock.GetPreviewByTagID got unexpected parameter tagID, want: %#v, got: %#v%s\n", *mm_want_ptrs.tagID, mm_got.tagID, minimock.Diff(*mm_want_ptrs.tagID, mm_got.tagID))
|
|
mmGetPreviewByTagID.t.Errorf("ArticleRepositoryMock.GetPreviewByTagID got unexpected parameter tagID, want: %#v, got: %#v%s\n", *mm_want_ptrs.tagID, mm_got.tagID, minimock.Diff(*mm_want_ptrs.tagID, mm_got.tagID))
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if mm_want_ptrs.lang != nil && !minimock.Equal(*mm_want_ptrs.lang, mm_got.lang) {
|
|
|
|
+ mmGetPreviewByTagID.t.Errorf("ArticleRepositoryMock.GetPreviewByTagID got unexpected parameter lang, want: %#v, got: %#v%s\n", *mm_want_ptrs.lang, mm_got.lang, minimock.Diff(*mm_want_ptrs.lang, mm_got.lang))
|
|
|
|
+ }
|
|
|
|
+
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
} else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
|
|
mmGetPreviewByTagID.t.Errorf("ArticleRepositoryMock.GetPreviewByTagID got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
mmGetPreviewByTagID.t.Errorf("ArticleRepositoryMock.GetPreviewByTagID got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
|
|
}
|
|
}
|
|
@@ -921,9 +1005,9 @@ func (mmGetPreviewByTagID *ArticleRepositoryMock) GetPreviewByTagID(ctx context.
|
|
return (*mm_results).aa1, (*mm_results).err
|
|
return (*mm_results).aa1, (*mm_results).err
|
|
}
|
|
}
|
|
if mmGetPreviewByTagID.funcGetPreviewByTagID != nil {
|
|
if mmGetPreviewByTagID.funcGetPreviewByTagID != nil {
|
|
- return mmGetPreviewByTagID.funcGetPreviewByTagID(ctx, tagID)
|
|
|
|
|
|
+ return mmGetPreviewByTagID.funcGetPreviewByTagID(ctx, tagID, lang)
|
|
}
|
|
}
|
|
- mmGetPreviewByTagID.t.Fatalf("Unexpected call to ArticleRepositoryMock.GetPreviewByTagID. %v %v", ctx, tagID)
|
|
|
|
|
|
+ mmGetPreviewByTagID.t.Fatalf("Unexpected call to ArticleRepositoryMock.GetPreviewByTagID. %v %v %v", ctx, tagID, lang)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|