-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: builder: add With prefix for all builder options
Signed-off-by: Dmitrii Aleksandrov <[email protected]>
- Loading branch information
Showing
5 changed files
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,7 @@ func TestRepository_GetList(t *testing.T) { | |
expectedErr: ErrTest, | ||
}, | ||
{ | ||
name: "AfterSelect modifies models", | ||
name: "WithAfterSelect modifies models", | ||
executor: &MockExecutor[model]{ | ||
GetMultipleFunc: func(ctx context.Context, stmt executor.Stmt) ([]*model, error) { | ||
return []*model{ | ||
|
@@ -430,10 +430,10 @@ func TestRepository_Insert(t *testing.T) { | |
model: &model{Name: "John Doe", Email: "[email protected]"}, | ||
expectedErr: nil, | ||
beforeInsert: func(ctx context.Context, model *model) { | ||
model.Name = "BeforeInsert Name" | ||
model.Name = "WithBeforeInsert Name" | ||
}, | ||
afterInsert: func(ctx context.Context, model *model) { | ||
model.Name = "AfterInsert Name" | ||
model.Name = "WithAfterInsert Name" | ||
}, | ||
}, | ||
{ | ||
|
@@ -447,7 +447,7 @@ func TestRepository_Insert(t *testing.T) { | |
expectedErr: ErrTest, | ||
}, | ||
{ | ||
name: "BeforeInsert modifies model", | ||
name: "WithBeforeInsert modifies model", | ||
executor: &MockExecutor[model]{ | ||
InsertOneFunc: func(ctx context.Context, stmt executor.Stmt, model *model) error { | ||
if model.Name != "Modified Name" { | ||
|
@@ -463,7 +463,7 @@ func TestRepository_Insert(t *testing.T) { | |
}, | ||
}, | ||
{ | ||
name: "AfterInsert modifies model", | ||
name: "WithAfterInsert modifies model", | ||
executor: &MockExecutor[model]{ | ||
InsertOneFunc: func(ctx context.Context, stmt executor.Stmt, model *model) error { | ||
return nil | ||
|
@@ -534,10 +534,10 @@ func TestRepository_Update(t *testing.T) { | |
model: &model{ID: 1, Name: "Updated Name", Email: "[email protected]"}, | ||
expectedErr: nil, | ||
beforeUpdate: func(ctx context.Context, model *model) { | ||
model.Name = "BeforeUpdate Name" | ||
model.Name = "WithBeforeUpdate Name" | ||
}, | ||
afterUpdate: func(ctx context.Context, model *model) { | ||
model.Name = "AfterUpdate Name" | ||
model.Name = "WithAfterUpdate Name" | ||
}, | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters