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
Update: After debuggin I have seen that after call method public ArchRule because(String reason)optionalLayers variable changes from true to false.
Update 2: The problem is rule.as (ArchRule line 133) call that launch the creation of a new Onion Architecture (@publicapi(usage = ACCESS) ) but doesn't initialize the flag optionalLayers. It takes the default value (false).
The text was updated successfully, but these errors were encountered:
Thanks for raising the issue and providing the analysis!! You're right, this must have been an oversight when the flag was added 🙈 I tried to fix it in #1226 if you want to take a look...
The `OnionArchitecture.as(..)` method (and transitively `because(..)`)
didn't pass the `optionalLayers` property along when creating a `new
OnionArchitecture(..)` on return. Thus, once a test called `as(..)` or
`because(..)` on the rule text `optionalLayers` would be reset to
`false`.
Resolves: #1185
codecholeric
changed the title
OnionArchitecture: "withOptionalLayers" and "because" in the same statement casues that withOptionalLayers has no effect
OnionArchitecture: "withOptionalLayers" and "because" in the same statement causes that withOptionalLayers has no effect
Apr 10, 2024
Hi!
I wrote this statement
When I launched test, the output was:
Layer 'domain service' is empty
If I remove because( ... ) statement all works fine.
Dependency info
Update: After debuggin I have seen that after call method
public ArchRule because(String reason)
optionalLayers variable changes from true to false.Update 2: The problem is
rule.as
(ArchRule line 133) call that launch the creation of a new Onion Architecture (@publicapi(usage = ACCESS) ) but doesn't initialize the flag optionalLayers. It takes the default value (false).The text was updated successfully, but these errors were encountered: