feat: initial commit
This commit is contained in:
19
test/testutil/fake_workflow_dispatcher.go
Normal file
19
test/testutil/fake_workflow_dispatcher.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package testutil
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/paramah/gw_telegram/internal/domain/entity"
|
||||
)
|
||||
|
||||
type FakeWorkflowDispatcher struct {
|
||||
Response entity.WorkflowResponse
|
||||
Error error
|
||||
CallCount int
|
||||
LastRequest entity.WorkflowRequest
|
||||
}
|
||||
|
||||
func (f *FakeWorkflowDispatcher) Dispatch(_ context.Context, req entity.WorkflowRequest) (entity.WorkflowResponse, error) {
|
||||
f.CallCount++
|
||||
f.LastRequest = req
|
||||
return f.Response, f.Error
|
||||
}
|
||||
Reference in New Issue
Block a user