fix description of targetOwner predicate#1579
Conversation
c62cade to
1042dbc
Compare
targetOwner was producing the same message as target() eg. "access target where target is annotated with..." instead of "access target where owner is annotated with..." Signed-off-by: John Burns <wakingrufus@gmail.com>
1042dbc to
6eaaa29
Compare
StefanGraeber
left a comment
There was a problem hiding this comment.
Thanks for localizing the incorrect message and creating a PR.
I prefer to generate target owner instead of just owner and also fix originOwner.
I created a modified PR: #1603
| */ | ||
| package com.tngtech.archunit.core.domain; | ||
|
|
||
| import java.util.Collections; |
There was a problem hiding this comment.
please fix you code formatting as described in https://github.com/TNG/ArchUnit/blob/main/CONTRIBUTING.md#formatting
| JavaAccess.Predicates.targetOwner(DescribedPredicate.<JavaClass>alwaysTrue().as("some text")); | ||
|
|
||
| assertThat(predicate) | ||
| .hasDescription("owner some text") |
There was a problem hiding this comment.
this text doesn't specify that the owner is related in any way to the target or any hint what is owned.
Is it the target owner or the origin owner?
I think the issue you are fixing here also exists for the origin(Owner) in exactly the same constellation.
The test also doesn't test that the correct object is passed to the nested predicate (which also not done by origin_predicate)
targetOwner was producing the same message as target() eg. "access target where target is annotated with..." instead of "access target where owner is annotated with..."