Commit 052069a
add a red/green fixture test for every shipped rule
Each of the 13 rules gets a fixture built to violate it and one built to satisfy
it, asserted on the violation count and message rather than on the rule having
run. The library had no such test, which is why rules that match nothing have
been reporting success.
This commit is deliberately red: nine tests fail. Eight fixtures that must
produce a violation do not.
- test classes with no production counterpart (rule is fully dead)
- a blacklisted annotation on a constructor parameter
- a blacklisted method call from a constructor
- a blacklisted method call from an instance field initializer
- System.out from a constructor
- a @nested test class whose production class is missing entirely
- a controller method covered only by a longer-named sibling's @nested class
- a non-static SortMappings field
The ninth is not a fixture: the blacklist names three AssertJ methods that do not
exist, so those entries can never match.
Fixtures live outside it.aboutbits.archunit.toolbox so the project's own
ArchitectureTest does not analyse them, and are excluded from surefire because
some are named *Test.
Third-party types the blacklists name are stubbed rather than depended on:
spring-boot-toolbox depends on archunit-toolbox, so SortMappings, @Store and
@ArchAllowDirectAccess cannot come from there. The stub contracts were verified
against the real 2.5.2 artifact.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 8aee4f1 commit 052069a
82 files changed
Lines changed: 1367 additions & 0 deletions
File tree
- src/test/java
- it/aboutbits
- archunit
- fixture
- barren
- blacklistannotations
- badclass
- badctorparam
- badfield
- badmethod
- badparam
- good
- blacklistclasses
- bad
- good
- blacklistmethods
- badconstructor
- badfieldinit
- badmethod
- badstatic
- good
- jspecify
- bad
- good
- nestedclassname
- badgroup
- badmethod
- badnoproduction
- goodoptout
- good
- nestedclassvisibility
- bad
- good
- recordaccessor
- badnested
- goodaccessor
- goodoptout
- securitytested
- badmissing
- badnonested
- badprefix
- goodnestedgroup
- good
- sortmappings
- badnonstatic
- bad
- good
- systemout
- badconstructor
- badlambda
- badmethod
- badstatic
- good
- testclasspackage
- bad
- goodoptout
- good
- testclassvisibility
- bad
- good
- testmethodvisibility
- bad
- good
- toolbox
- rule
- base
- common
- util
- springboot/toolbox
- archunit
- persistence
- stereotype
- net/datafaker
- org/junit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
53 | 79 | | |
54 | 80 | | |
55 | 81 | | |
| |||
98 | 124 | | |
99 | 125 | | |
100 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
101 | 141 | | |
102 | 142 | | |
103 | 143 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments