Compare commits
No commits in common. "fe90d81b5d9de0a0c2fd375deb341cf254bedd58" and "b73723b5f552c9b71f610819b9a7c1c0689a98e7" have entirely different histories.
fe90d81b5d
...
b73723b5f5
@ -10,7 +10,7 @@ type testCommandRequest struct {
|
||||
}
|
||||
|
||||
func TestSimpleCommandExec(t *testing.T) {
|
||||
dispatcher := NewDispatcher()
|
||||
bus := NewBus()
|
||||
|
||||
handlerCalled := false
|
||||
|
||||
@ -19,7 +19,7 @@ func TestSimpleCommandExec(t *testing.T) {
|
||||
return nil
|
||||
}
|
||||
|
||||
dispatcher.RegisterCommand(
|
||||
bus.RegisterCommand(
|
||||
MatchCommandRequest(&testCommandRequest{}),
|
||||
CommandHandlerFunc(handleTestCommand),
|
||||
)
|
||||
@ -29,7 +29,7 @@ func TestSimpleCommandExec(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
|
||||
result, err := dispatcher.Exec(ctx, cmd)
|
||||
result, err := bus.Exec(ctx, cmd)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
func TestBasicCommandMiddleware(t *testing.T) {
|
||||
dispatcher := NewDispatcher()
|
||||
bus := NewBus()
|
||||
|
||||
handlerCalled := false
|
||||
|
||||
@ -26,7 +26,7 @@ func TestBasicCommandMiddleware(t *testing.T) {
|
||||
return CommandHandlerFunc(fn)
|
||||
}
|
||||
|
||||
dispatcher.RegisterCommand(
|
||||
bus.RegisterCommand(
|
||||
MatchCommandRequest(&testCommandRequest{}),
|
||||
CommandHandlerFunc(handleTestCommand),
|
||||
commandMiddleware,
|
||||
@ -37,7 +37,7 @@ func TestBasicCommandMiddleware(t *testing.T) {
|
||||
}
|
||||
ctx := context.Background()
|
||||
|
||||
result, err := dispatcher.Exec(ctx, cmd)
|
||||
result, err := bus.Exec(ctx, cmd)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
@ -20,9 +20,7 @@ func Example_usage() {
|
||||
|
||||
// On expose le service "template" avec l'implémentation
|
||||
// basée sur le moteur de rendu HTML de la librairie standard
|
||||
container.Provide(template.ServiceName, html.ServiceProvider(
|
||||
html.NewDirectoryLoader("./templates"),
|
||||
))
|
||||
container.Provide(template.ServiceName, html.ServiceProvider("./templates"))
|
||||
|
||||
router := chi.NewRouter()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user