generated from dogmatiq/template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
108 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
58 changes: 0 additions & 58 deletions
58
config/staticconfig/testdata/_pending/dynamic-routes-in-handlers.md
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
config/staticconfig/testdata/_pending/nil-routes-in-handlers.md
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Handler with nil route | ||
|
||
This test verifies that the static analyzer correctly detects a `nil` route. | ||
|
||
```au:output au:group=matrix | ||
valid application github.com/dogmatiq/enginekit/config/staticconfig.App (value unavailable) | ||
- valid identity app/e4183527-c234-42d5-8709-3dc8b9d5caa4 | ||
- invalid integration github.com/dogmatiq/enginekit/config/staticconfig.Integration (value unavailable) | ||
- no handles-command routes | ||
- valid identity handler/5752bb84-0b65-4a7f-b2fa-bfb77a53a97f | ||
- incomplete route | ||
- route type is unavailable | ||
- message type name is unavailable | ||
``` | ||
|
||
```go au:input au:group=matrix | ||
package app | ||
|
||
import "context" | ||
import "github.com/dogmatiq/dogma" | ||
|
||
type Integration struct{} | ||
|
||
func (Integration) Configure(c dogma.IntegrationConfigurer) { | ||
c.Identity("handler", "5752bb84-0b65-4a7f-b2fa-bfb77a53a97f") | ||
c.Routes(nil) | ||
} | ||
|
||
func (Integration) HandleCommand(context.Context, dogma.IntegrationCommandScope, dogma.Command) error { return nil } | ||
|
||
type App struct{} | ||
|
||
func (App) Configure(c dogma.ApplicationConfigurer) { | ||
c.Identity("app", "e4183527-c234-42d5-8709-3dc8b9d5caa4") | ||
c.RegisterIntegration(Integration{}) | ||
} | ||
``` |