Commit 45d3020
committed
Add HaveAnyParameters and NotHaveAnyParameters conditions for MethodMembers
- Add HaveAnyParameters() condition to check if methods have parameters
- Add NotHaveAnyParameters() condition to check if methods have no parameters
- Add corresponding methods to IMethodMemberConditions interface
- Add comprehensive test coverage for both conditions
- Test both regular methods and constructors
- Verify failure descriptions in violation cases
- Use correct IL method names (.ctor) for constructor tests
- Remove redundant test cases that provided no additional value
The new conditions enable architectural rules to enforce parameter
requirements on methods and constructors, complementing existing
method member conditions.
Signed-off-by: Ahmed Mohamed El Ahmar <[email protected]>1 parent c87381f commit 45d3020
File tree
9 files changed
+290
-173
lines changed- ArchUnitNETTests/Fluent/Syntax/Elements
- ArchUnitNET/Fluent/Syntax/Elements
- Members/MethodMembers
- Types/Classes
- TestAssembly/Domain
- Entities
- Methods
9 files changed
+290
-173
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
Lines changed: 39 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
303 | | - | |
304 | | - | |
| 304 | + | |
| 305 | + | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
| |||
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| 363 | + | |
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
| |||
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
385 | | - | |
386 | | - | |
| 387 | + | |
| 388 | + | |
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
| |||
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
| 662 | + | |
660 | 663 | | |
661 | 664 | | |
662 | 665 | | |
| |||
799 | 802 | | |
800 | 803 | | |
801 | 804 | | |
802 | | - | |
803 | | - | |
| 805 | + | |
| 806 | + | |
804 | 807 | | |
805 | 808 | | |
806 | 809 | | |
| |||
861 | 864 | | |
862 | 865 | | |
863 | 866 | | |
| 867 | + | |
864 | 868 | | |
865 | 869 | | |
866 | 870 | | |
| |||
884 | 888 | | |
885 | 889 | | |
886 | 890 | | |
887 | | - | |
888 | | - | |
| 891 | + | |
| 892 | + | |
889 | 893 | | |
890 | 894 | | |
891 | 895 | | |
| |||
1011 | 1015 | | |
1012 | 1016 | | |
1013 | 1017 | | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1014 | 1044 | | |
1015 | | - | |
| 1045 | + | |
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
300 | 315 | | |
301 | | - | |
| 316 | + | |
Lines changed: 0 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 46 | | |
58 | 47 | | |
59 | 48 | | |
| |||
92 | 81 | | |
93 | 82 | | |
94 | 83 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 84 | | |
106 | 85 | | |
Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 36 | | |
43 | 37 | | |
44 | 38 | | |
| |||
64 | 58 | | |
65 | 59 | | |
66 | 60 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 61 | | |
74 | 62 | | |
Lines changed: 0 additions & 73 deletions
This file was deleted.
0 commit comments