package mocks import ( "context" "github.com/food-ai/backend/internal/domain/userproduct" ) // MockUserProductRepository is a test double implementing userproduct.UserProductRepository. type MockUserProductRepository struct { ListFn func(ctx context.Context, userID string) ([]*userproduct.UserProduct, error) CreateFn func(ctx context.Context, userID string, req userproduct.CreateRequest) (*userproduct.UserProduct, error) BatchCreateFn func(ctx context.Context, userID string, items []userproduct.CreateRequest) ([]*userproduct.UserProduct, error) UpdateFn func(ctx context.Context, id, userID string, req userproduct.UpdateRequest) (*userproduct.UserProduct, error) DeleteFn func(ctx context.Context, id, userID string) error } func (m *MockUserProductRepository) List(ctx context.Context, userID string) ([]*userproduct.UserProduct, error) { return m.ListFn(ctx, userID) } func (m *MockUserProductRepository) Create(ctx context.Context, userID string, req userproduct.CreateRequest) (*userproduct.UserProduct, error) { return m.CreateFn(ctx, userID, req) } func (m *MockUserProductRepository) BatchCreate(ctx context.Context, userID string, items []userproduct.CreateRequest) ([]*userproduct.UserProduct, error) { return m.BatchCreateFn(ctx, userID, items) } func (m *MockUserProductRepository) Update(ctx context.Context, id, userID string, req userproduct.UpdateRequest) (*userproduct.UserProduct, error) { return m.UpdateFn(ctx, id, userID, req) } func (m *MockUserProductRepository) Delete(ctx context.Context, id, userID string) error { return m.DeleteFn(ctx, id, userID) }