You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code, I am working within a shared core. As part of the testing, I need to write tests to ensure ACLs are working accurately within the same ESDB instance. The problem comes when I need to do [Domain1].[Aggregate] and [Domain2].[Aggregate], as the default PrefixedCamelCaseStreamNameBuilder does not properly build the stream names to support multiple domains.
For now, I am going to cut & paste the code for MockRepositorySpecification and adjust to my needs. With that said, if there could be an adjustment to the constructor, providing an overload which allows passing a preferred IStreamNameBuilder to allow for testing scenarios such as these. Thoughts?
The text was updated successfully, but these errors were encountered:
The PrefixedCamelCaseStreamNameBuilder is meant to build aggregates for a single schema. I don't think it would be a good idea to create a custom stream name builder to support multiple schemas since it would also require a new custom IRepository implementation that also supports multiple schemas. I think it would be cleaner to create multiple repositories to access the same mock stream store, one repo for each schema. The MockRepositorySpecification doesn't support this, but we could easily have a similar class (MockMultiRepositorySpecification?) to support multiple mock repos for multiple schemas.
I've pushed a proposed implementation to this branch. It needs unit tests, but I think the test fixture itself is reasonably complete. Please post thoughts/comments on it here.
In my code, I am working within a shared core. As part of the testing, I need to write tests to ensure ACLs are working accurately within the same ESDB instance. The problem comes when I need to do
[Domain1].[Aggregate]
and[Domain2].[Aggregate]
, as the defaultPrefixedCamelCaseStreamNameBuilder
does not properly build the stream names to support multiple domains.For now, I am going to cut & paste the code for
MockRepositorySpecification
and adjust to my needs. With that said, if there could be an adjustment to the constructor, providing an overload which allows passing a preferredIStreamNameBuilder
to allow for testing scenarios such as these. Thoughts?The text was updated successfully, but these errors were encountered: