From 775531e7aaee17047c2a9108b4a87280ae89a337 Mon Sep 17 00:00:00 2001 From: James Harris Date: Wed, 21 Aug 2024 11:31:19 +1000 Subject: [PATCH] Use `NameOf()` and `TypeOf()` instead of configkit fixtures. --- application_test.go | 40 +++--- entity_test.go | 119 +++++++++--------- handlerset_test.go | 20 +-- integration_test.go | 12 +- internal/entity/entity_test.go | 9 +- process_test.go | 20 +-- projection_test.go | 8 +- static/adaptor_test.go | 38 +++--- static/app_test.go | 18 +-- static/constructor_test.go | 38 +++--- static/handler_test.go | 218 ++++++++++++++++----------------- 11 files changed, 269 insertions(+), 271 deletions(-) diff --git a/application_test.go b/application_test.go index 1340d927..1f8de5d2 100644 --- a/application_test.go +++ b/application_test.go @@ -110,18 +110,18 @@ var _ = Describe("func FromApplication()", func() { Expect(cfg.MessageNames()).To(Equal( EntityMessageNames{ Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.EventRole, - cfixtures.MessageFTypeName: message.EventRole, - cfixtures.MessageTTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.EventRole, + message.NameFor[fixtures.MessageF](): message.EventRole, + message.NameFor[fixtures.MessageT](): message.TimeoutRole, }, Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.EventRole, - cfixtures.MessageETypeName: message.EventRole, - cfixtures.MessageTTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.EventRole, + message.NameFor[fixtures.MessageT](): message.TimeoutRole, }, }, )) @@ -133,18 +133,18 @@ var _ = Describe("func FromApplication()", func() { Expect(cfg.MessageTypes()).To(Equal( EntityMessageTypes{ Produced: message.TypeRoles{ - cfixtures.MessageCType: message.CommandRole, - cfixtures.MessageEType: message.EventRole, - cfixtures.MessageFType: message.EventRole, - cfixtures.MessageTType: message.TimeoutRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, + message.TypeFor[fixtures.MessageE](): message.EventRole, + message.TypeFor[fixtures.MessageF](): message.EventRole, + message.TypeFor[fixtures.MessageT](): message.TimeoutRole, }, Consumed: message.TypeRoles{ - cfixtures.MessageAType: message.CommandRole, - cfixtures.MessageBType: message.EventRole, - cfixtures.MessageCType: message.CommandRole, - cfixtures.MessageDType: message.EventRole, - cfixtures.MessageEType: message.EventRole, - cfixtures.MessageTType: message.TimeoutRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, + message.TypeFor[fixtures.MessageB](): message.EventRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, + message.TypeFor[fixtures.MessageD](): message.EventRole, + message.TypeFor[fixtures.MessageE](): message.EventRole, + message.TypeFor[fixtures.MessageT](): message.TimeoutRole, }, }, )) diff --git a/entity_test.go b/entity_test.go index 5593e7fa..8d51e6e9 100644 --- a/entity_test.go +++ b/entity_test.go @@ -2,9 +2,8 @@ package configkit_test import ( . "github.com/dogmatiq/configkit" - "github.com/dogmatiq/configkit/fixtures" // can't dot-import due to conflicts - cfixtures "github.com/dogmatiq/configkit/fixtures" "github.com/dogmatiq/configkit/message" + "github.com/dogmatiq/dogma/fixtures" // can't dot-import due to conflicts . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" @@ -15,11 +14,11 @@ var _ = Describe("type EntityMessageNames", func() { It("returns the role of a produced message", func() { m := EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageATypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, }, } - r, ok := m.RoleOf(fixtures.MessageATypeName) + r, ok := m.RoleOf(message.NameFor[fixtures.MessageA]()) Expect(ok).To(BeTrue()) Expect(r).To(Equal(message.CommandRole)) }) @@ -27,11 +26,11 @@ var _ = Describe("type EntityMessageNames", func() { It("returns the role of a consumed message", func() { m := EntityMessageNames{ Consumed: message.NameRoles{ - fixtures.MessageATypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, }, } - r, ok := m.RoleOf(fixtures.MessageATypeName) + r, ok := m.RoleOf(message.NameFor[fixtures.MessageA]()) Expect(ok).To(BeTrue()) Expect(r).To(Equal(message.CommandRole)) }) @@ -39,7 +38,7 @@ var _ = Describe("type EntityMessageNames", func() { It("returns false if the message is neither produced nor consumed", func() { m := EntityMessageNames{} - _, ok := m.RoleOf(fixtures.MessageATypeName) + _, ok := m.RoleOf(message.NameFor[fixtures.MessageA]()) Expect(ok).To(BeFalse()) }) }) @@ -48,17 +47,17 @@ var _ = Describe("type EntityMessageNames", func() { It("returns the union of the produced and consumed messages", func() { m := EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageCTypeName: message.CommandRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, }, Consumed: message.NameRoles{ - fixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageE](): message.EventRole, }, } Expect(m.All()).To(Equal( message.NameRoles{ - fixtures.MessageCTypeName: message.CommandRole, - fixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.EventRole, }, )) }) @@ -68,24 +67,24 @@ var _ = Describe("type EntityMessageNames", func() { It("returns the set of messages that belong to another application", func() { m := EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageETypeName: message.EventRole, - fixtures.MessageDTypeName: message.CommandRole, // foreign-consumed command + message.NameFor[fixtures.MessageE](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, // foreign-consumed command }, Consumed: message.NameRoles{ - fixtures.MessageCTypeName: message.CommandRole, // foreign-produced command - fixtures.MessageFTypeName: message.EventRole, // foreign-produced event - fixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, // foreign-produced command + message.NameFor[fixtures.MessageF](): message.EventRole, // foreign-produced event + message.NameFor[fixtures.MessageE](): message.EventRole, }, } Expect(m.Foreign()).To(Equal( EntityMessageNames{ Produced: message.NameRoles{ - cfixtures.MessageDTypeName: message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, }, Consumed: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageFTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageF](): message.EventRole, }, }, )) @@ -96,19 +95,19 @@ var _ = Describe("type EntityMessageNames", func() { It("returns true if the sets are equivalent", func() { a := EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.NameRoles{ - fixtures.MessageATypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, }, } b := EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.NameRoles{ - fixtures.MessageATypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, }, } @@ -120,10 +119,10 @@ var _ = Describe("type EntityMessageNames", func() { func(b EntityMessageNames) { a := EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.NameRoles{ - fixtures.MessageATypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, }, } Expect(a.IsEqual(b)).To(BeFalse()) @@ -132,11 +131,11 @@ var _ = Describe("type EntityMessageNames", func() { "produced messages differ", EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageBTypeName: message.EventRole, - fixtures.MessageCTypeName: message.TimeoutRole, // diff + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageC](): message.TimeoutRole, // diff }, Consumed: message.NameRoles{ - fixtures.MessageATypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, }, }, ), @@ -144,11 +143,11 @@ var _ = Describe("type EntityMessageNames", func() { "consumed messages differ", EntityMessageNames{ Produced: message.NameRoles{ - fixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.NameRoles{ - fixtures.MessageATypeName: message.CommandRole, - fixtures.MessageCTypeName: message.TimeoutRole, // diff + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageC](): message.TimeoutRole, // diff }, }, ), @@ -161,11 +160,11 @@ var _ = Describe("type EntityMessageTypes", func() { It("returns the role of a produced message", func() { m := EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageAType: message.CommandRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, }, } - r, ok := m.RoleOf(fixtures.MessageAType) + r, ok := m.RoleOf(message.TypeFor[fixtures.MessageA]()) Expect(ok).To(BeTrue()) Expect(r).To(Equal(message.CommandRole)) }) @@ -173,11 +172,11 @@ var _ = Describe("type EntityMessageTypes", func() { It("returns the role of a consumed message", func() { m := EntityMessageTypes{ Consumed: message.TypeRoles{ - fixtures.MessageAType: message.CommandRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, }, } - r, ok := m.RoleOf(fixtures.MessageAType) + r, ok := m.RoleOf(message.TypeFor[fixtures.MessageA]()) Expect(ok).To(BeTrue()) Expect(r).To(Equal(message.CommandRole)) }) @@ -185,7 +184,7 @@ var _ = Describe("type EntityMessageTypes", func() { It("returns false if the message is neither produced nor consumed", func() { m := EntityMessageTypes{} - _, ok := m.RoleOf(fixtures.MessageAType) + _, ok := m.RoleOf(message.TypeFor[fixtures.MessageA]()) Expect(ok).To(BeFalse()) }) }) @@ -194,17 +193,17 @@ var _ = Describe("type EntityMessageTypes", func() { It("returns the union of the produced and consumed messages", func() { m := EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageCType: message.CommandRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, }, Consumed: message.TypeRoles{ - fixtures.MessageEType: message.EventRole, + message.TypeFor[fixtures.MessageE](): message.EventRole, }, } Expect(m.All()).To(Equal( message.TypeRoles{ - fixtures.MessageCType: message.CommandRole, - fixtures.MessageEType: message.EventRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, + message.TypeFor[fixtures.MessageE](): message.EventRole, }, )) }) @@ -214,24 +213,24 @@ var _ = Describe("type EntityMessageTypes", func() { It("returns the set of messages that belong to another entity", func() { m := EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageEType: message.EventRole, - fixtures.MessageDType: message.CommandRole, // foreign-consumed command + message.TypeFor[fixtures.MessageE](): message.EventRole, + message.TypeFor[fixtures.MessageD](): message.CommandRole, // foreign-consumed command }, Consumed: message.TypeRoles{ - fixtures.MessageCType: message.CommandRole, // foreign-produced command - fixtures.MessageFType: message.EventRole, // foreign-produced event - fixtures.MessageEType: message.EventRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, // foreign-produced command + message.TypeFor[fixtures.MessageF](): message.EventRole, // foreign-produced event + message.TypeFor[fixtures.MessageE](): message.EventRole, }, } Expect(m.Foreign()).To(Equal( EntityMessageTypes{ Produced: message.TypeRoles{ - cfixtures.MessageDType: message.CommandRole, + message.TypeFor[fixtures.MessageD](): message.CommandRole, }, Consumed: message.TypeRoles{ - cfixtures.MessageCType: message.CommandRole, - cfixtures.MessageFType: message.EventRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, + message.TypeFor[fixtures.MessageF](): message.EventRole, }, }, )) @@ -242,19 +241,19 @@ var _ = Describe("type EntityMessageTypes", func() { It("returns true if the sets are equivalent", func() { a := EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageBType: message.EventRole, + message.TypeFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.TypeRoles{ - fixtures.MessageAType: message.CommandRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, }, } b := EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageBType: message.EventRole, + message.TypeFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.TypeRoles{ - fixtures.MessageAType: message.CommandRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, }, } @@ -266,10 +265,10 @@ var _ = Describe("type EntityMessageTypes", func() { func(b EntityMessageTypes) { a := EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageBType: message.EventRole, + message.TypeFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.TypeRoles{ - fixtures.MessageAType: message.CommandRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, }, } Expect(a.IsEqual(b)).To(BeFalse()) @@ -278,11 +277,11 @@ var _ = Describe("type EntityMessageTypes", func() { "produced messages differ", EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageBType: message.EventRole, - fixtures.MessageCType: message.TimeoutRole, // diff + message.TypeFor[fixtures.MessageB](): message.EventRole, + message.TypeFor[fixtures.MessageC](): message.TimeoutRole, // diff }, Consumed: message.TypeRoles{ - fixtures.MessageAType: message.CommandRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, }, }, ), @@ -290,11 +289,11 @@ var _ = Describe("type EntityMessageTypes", func() { "consumed messages differ", EntityMessageTypes{ Produced: message.TypeRoles{ - fixtures.MessageBType: message.EventRole, + message.TypeFor[fixtures.MessageB](): message.EventRole, }, Consumed: message.TypeRoles{ - fixtures.MessageAType: message.CommandRole, - fixtures.MessageCType: message.TimeoutRole, // diff + message.TypeFor[fixtures.MessageA](): message.CommandRole, + message.TypeFor[fixtures.MessageC](): message.TimeoutRole, // diff }, }, ), diff --git a/handlerset_test.go b/handlerset_test.go index c1300e68..0b4f9c4a 100644 --- a/handlerset_test.go +++ b/handlerset_test.go @@ -159,7 +159,7 @@ var _ = Describe("type HandlerSet", func() { }) It("returns the handlers that consume the given message", func() { - subset := set.ConsumersOf(cfixtures.MessageCTypeName) + subset := set.ConsumersOf(message.NameFor[fixtures.MessageC]()) Expect(subset).To(HaveLen(1)) Expect(set.Has(aggregate)).To(BeTrue()) }) @@ -172,7 +172,7 @@ var _ = Describe("type HandlerSet", func() { }) It("returns the handlers the produce the given message", func() { - subset := set.ProducersOf(cfixtures.MessageETypeName) + subset := set.ProducersOf(message.NameFor[fixtures.MessageE]()) Expect(subset).To(HaveLen(1)) Expect(set.Has(aggregate)).To(BeTrue()) }) @@ -188,11 +188,11 @@ var _ = Describe("type HandlerSet", func() { Expect(set.MessageNames()).To(Equal( EntityMessageNames{ Produced: message.NameRoles{ - cfixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageE](): message.EventRole, }, Consumed: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.EventRole, }, }, )) @@ -704,7 +704,7 @@ var _ = Describe("type RichHandlerSet", func() { }) It("returns the handlers that consume the given message", func() { - subset := set.ConsumersOf(cfixtures.MessageCType) + subset := set.ConsumersOf(message.TypeFor[fixtures.MessageC]()) Expect(subset).To(HaveLen(1)) Expect(set.Has(aggregate)).To(BeTrue()) }) @@ -717,7 +717,7 @@ var _ = Describe("type RichHandlerSet", func() { }) It("returns the handlers the produce the given message", func() { - subset := set.ProducersOf(cfixtures.MessageEType) + subset := set.ProducersOf(message.TypeFor[fixtures.MessageE]()) Expect(subset).To(HaveLen(1)) Expect(set.Has(aggregate)).To(BeTrue()) }) @@ -733,11 +733,11 @@ var _ = Describe("type RichHandlerSet", func() { Expect(set.MessageTypes()).To(Equal( EntityMessageTypes{ Produced: message.TypeRoles{ - cfixtures.MessageEType: message.EventRole, + message.TypeFor[fixtures.MessageE](): message.EventRole, }, Consumed: message.TypeRoles{ - cfixtures.MessageCType: message.CommandRole, - cfixtures.MessageEType: message.EventRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, + message.TypeFor[fixtures.MessageE](): message.EventRole, }, }, )) diff --git a/integration_test.go b/integration_test.go index fb1dc4bc..46f45e16 100644 --- a/integration_test.go +++ b/integration_test.go @@ -52,11 +52,11 @@ var _ = Describe("func FromIntegration()", func() { Expect(cfg.MessageNames()).To(Equal( EntityMessageNames{ Produced: message.NameRoles{ - cfixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageE](): message.EventRole, }, Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, }, )) @@ -68,11 +68,11 @@ var _ = Describe("func FromIntegration()", func() { Expect(cfg.MessageTypes()).To(Equal( EntityMessageTypes{ Produced: message.TypeRoles{ - cfixtures.MessageEType: message.EventRole, + message.TypeFor[fixtures.MessageE](): message.EventRole, }, Consumed: message.TypeRoles{ - cfixtures.MessageAType: message.CommandRole, - cfixtures.MessageBType: message.CommandRole, + message.TypeFor[fixtures.MessageA](): message.CommandRole, + message.TypeFor[fixtures.MessageB](): message.CommandRole, }, }, )) diff --git a/internal/entity/entity_test.go b/internal/entity/entity_test.go index 97359d10..c36d34ea 100644 --- a/internal/entity/entity_test.go +++ b/internal/entity/entity_test.go @@ -7,7 +7,6 @@ import ( "github.com/dogmatiq/configkit" . "github.com/dogmatiq/configkit/fixtures" - cfixtures "github.com/dogmatiq/configkit/fixtures" . "github.com/dogmatiq/configkit/internal/entity" "github.com/dogmatiq/configkit/message" "github.com/dogmatiq/dogma" @@ -43,10 +42,10 @@ var _ = Describe("type Application", func() { It("returns the value of .MessageNamesValue field", func() { m := configkit.EntityMessageNames{ Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, }, Consumed: message.NameRoles{ - cfixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageE](): message.EventRole, }, } @@ -125,10 +124,10 @@ var _ = Describe("type Handler", func() { It("returns the value of .MessageNamesValue field", func() { m := configkit.EntityMessageNames{ Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, }, Consumed: message.NameRoles{ - cfixtures.MessageETypeName: message.EventRole, + message.NameFor[fixtures.MessageE](): message.EventRole, }, } diff --git a/process_test.go b/process_test.go index 574db08f..2850d09c 100644 --- a/process_test.go +++ b/process_test.go @@ -53,13 +53,13 @@ var _ = Describe("func FromProcess()", func() { Expect(cfg.MessageNames()).To(Equal( EntityMessageNames{ Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageTTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageT](): message.TimeoutRole, }, Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageTTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageT](): message.TimeoutRole, }, }, )) @@ -71,13 +71,13 @@ var _ = Describe("func FromProcess()", func() { Expect(cfg.MessageTypes()).To(Equal( EntityMessageTypes{ Produced: message.TypeRoles{ - cfixtures.MessageCType: message.CommandRole, - cfixtures.MessageTType: message.TimeoutRole, + message.TypeFor[fixtures.MessageC](): message.CommandRole, + message.TypeFor[fixtures.MessageT](): message.TimeoutRole, }, Consumed: message.TypeRoles{ - cfixtures.MessageAType: message.EventRole, - cfixtures.MessageBType: message.EventRole, - cfixtures.MessageTType: message.TimeoutRole, + message.TypeFor[fixtures.MessageA](): message.EventRole, + message.TypeFor[fixtures.MessageB](): message.EventRole, + message.TypeFor[fixtures.MessageT](): message.TimeoutRole, }, }, )) diff --git a/projection_test.go b/projection_test.go index b17899d7..d0aaae72 100644 --- a/projection_test.go +++ b/projection_test.go @@ -55,8 +55,8 @@ var _ = Describe("func FromProjection()", func() { EntityMessageNames{ Produced: nil, Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, }, )) @@ -69,8 +69,8 @@ var _ = Describe("func FromProjection()", func() { EntityMessageTypes{ Produced: nil, Consumed: message.TypeRoles{ - cfixtures.MessageAType: message.EventRole, - cfixtures.MessageBType: message.EventRole, + message.TypeFor[fixtures.MessageA](): message.EventRole, + message.TypeFor[fixtures.MessageB](): message.EventRole, }, }, )) diff --git a/static/adaptor_test.go b/static/adaptor_test.go index d9ea82bf..6c3db565 100644 --- a/static/adaptor_test.go +++ b/static/adaptor_test.go @@ -2,9 +2,9 @@ package static_test import ( "github.com/dogmatiq/configkit" - cfixtures "github.com/dogmatiq/configkit/fixtures" "github.com/dogmatiq/configkit/message" . "github.com/dogmatiq/configkit/static" + "github.com/dogmatiq/dogma/fixtures" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -38,12 +38,12 @@ var _ = Describe("func FromPackages() (adaptor function)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -67,16 +67,16 @@ var _ = Describe("func FromPackages() (adaptor function)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -100,8 +100,8 @@ var _ = Describe("func FromPackages() (adaptor function)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -126,12 +126,12 @@ var _ = Describe("func FromPackages() (adaptor function)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) diff --git a/static/app_test.go b/static/app_test.go index 198cab5d..59d77efd 100644 --- a/static/app_test.go +++ b/static/app_test.go @@ -2,9 +2,9 @@ package static_test import ( "github.com/dogmatiq/configkit" - cfixtures "github.com/dogmatiq/configkit/fixtures" "github.com/dogmatiq/configkit/message" . "github.com/dogmatiq/configkit/static" + "github.com/dogmatiq/dogma/fixtures" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -134,16 +134,16 @@ var _ = Describe("func FromPackages() (application detection)", func() { Expect(apps[0].MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.EventRole, }, }, )) diff --git a/static/constructor_test.go b/static/constructor_test.go index e6b7b635..48c430ee 100644 --- a/static/constructor_test.go +++ b/static/constructor_test.go @@ -2,9 +2,9 @@ package static_test import ( "github.com/dogmatiq/configkit" - cfixtures "github.com/dogmatiq/configkit/fixtures" "github.com/dogmatiq/configkit/message" . "github.com/dogmatiq/configkit/static" + "github.com/dogmatiq/dogma/fixtures" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -38,12 +38,12 @@ var _ = Describe("func FromPackages() (constructor function)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -67,16 +67,16 @@ var _ = Describe("func FromPackages() (constructor function)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -100,8 +100,8 @@ var _ = Describe("func FromPackages() (constructor function)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -126,12 +126,12 @@ var _ = Describe("func FromPackages() (constructor function)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) diff --git a/static/handler_test.go b/static/handler_test.go index 96e496de..865d4b11 100644 --- a/static/handler_test.go +++ b/static/handler_test.go @@ -4,9 +4,9 @@ import ( "os" "github.com/dogmatiq/configkit" - cfixtures "github.com/dogmatiq/configkit/fixtures" "github.com/dogmatiq/configkit/message" . "github.com/dogmatiq/configkit/static" + "github.com/dogmatiq/dogma/fixtures" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -52,12 +52,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -81,16 +81,16 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -114,8 +114,8 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -140,12 +140,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -194,12 +194,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -223,16 +223,16 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -256,8 +256,8 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -282,12 +282,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -322,12 +322,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -351,16 +351,16 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -384,8 +384,8 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -410,12 +410,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -450,12 +450,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -479,16 +479,16 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -512,8 +512,8 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -538,12 +538,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -578,12 +578,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -607,16 +607,16 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -640,8 +640,8 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -666,12 +666,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -861,12 +861,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(aggregate.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, )) @@ -890,16 +890,16 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(process.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.CommandRole, - cfixtures.MessageDTypeName: message.CommandRole, - cfixtures.MessageETypeName: message.TimeoutRole, - cfixtures.MessageFTypeName: message.TimeoutRole, + message.NameFor[fixtures.MessageC](): message.CommandRole, + message.NameFor[fixtures.MessageD](): message.CommandRole, + message.NameFor[fixtures.MessageE](): message.TimeoutRole, + message.NameFor[fixtures.MessageF](): message.TimeoutRole, }, }, )) @@ -923,8 +923,8 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(projection.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.EventRole, - cfixtures.MessageBTypeName: message.EventRole, + message.NameFor[fixtures.MessageA](): message.EventRole, + message.NameFor[fixtures.MessageB](): message.EventRole, }, Produced: message.NameRoles{}, }, @@ -949,12 +949,12 @@ var _ = Describe("func FromPackages() (handler analysis)", func() { Expect(integration.MessageNames()).To(Equal( configkit.EntityMessageNames{ Consumed: message.NameRoles{ - cfixtures.MessageATypeName: message.CommandRole, - cfixtures.MessageBTypeName: message.CommandRole, + message.NameFor[fixtures.MessageA](): message.CommandRole, + message.NameFor[fixtures.MessageB](): message.CommandRole, }, Produced: message.NameRoles{ - cfixtures.MessageCTypeName: message.EventRole, - cfixtures.MessageDTypeName: message.EventRole, + message.NameFor[fixtures.MessageC](): message.EventRole, + message.NameFor[fixtures.MessageD](): message.EventRole, }, }, ))