TNG / ArchUnit

A Java architecture test library, to specify and assert architecture rules in plain Java
http://archunit.org
Apache License 2.0
3.17k stars 287 forks source link

fix `OnionArchitecture` losing `optionalLayers` after `as` #1226

Closed codecholeric closed 5 months ago

codecholeric commented 7 months ago

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 commented 7 months ago

Thanks for fixing what I overlooked in #273!

Well... 🤷‍♂️ "codecholeric approved these changes on Jan 9, 2020"