|
22 | 22 |
|
23 | 23 |
|
24 | 24 | @JigServiceTest |
25 | | -class MethodSmellListTest { |
| 25 | +class MethodSmellsTest { |
26 | 26 |
|
27 | 27 | @Test |
28 | 28 | void 注意メソッドの抽出(JigService jigService, JigRepository jigRepository) { |
29 | | - MethodSmellList methodSmellList = jigService.methodSmells(jigRepository); |
| 29 | + MethodSmells methodSmells = jigService.methodSmells(jigRepository); |
30 | 30 |
|
31 | | - var detectedSmells = methodSmellList.list().stream() |
| 31 | + var detectedSmells = methodSmells.list().stream() |
32 | 32 | .filter(methodSmell -> methodSmell.method().declaringType().equals(TypeId.from(SmelledClass.class))) |
33 | 33 | .toList(); |
34 | 34 |
|
@@ -58,10 +58,10 @@ private static MethodSmell extractMethod(List<MethodSmell> detectedSmells, Strin |
58 | 58 | @ParameterizedTest(name = "{index} {1} :: {0}") |
59 | 59 | void メンバ未使用の判定(Class<?> clz, String name, boolean expected) { |
60 | 60 | var jigType = TestSupport.buildJigType(clz); |
61 | | - MethodSmellList methodSmellList = MethodSmellList.from(new JigTypes(List.of(jigType))); |
| 61 | + MethodSmells methodSmells = MethodSmells.from(new JigTypes(List.of(jigType))); |
62 | 62 |
|
63 | 63 | // smellListに入っていないものは警告なしの判定になるのでfilterとanyMatchで検証 |
64 | | - assertEquals(expected, methodSmellList.list().stream() |
| 64 | + assertEquals(expected, methodSmells.list().stream() |
65 | 65 | .filter(methodSmell -> methodSmell.method().name().equals(name)) |
66 | 66 | .anyMatch(MethodSmell::notUseMember) |
67 | 67 | ); |
@@ -103,9 +103,9 @@ private static MethodSmell extractMethod(List<MethodSmell> detectedSmells, Strin |
103 | 103 | */ |
104 | 104 | @Test |
105 | 105 | void 注意メソッドの抽出_record(JigService jigService, JigRepository jigRepository) { |
106 | | - MethodSmellList methodSmellList = jigService.methodSmells(jigRepository); |
| 106 | + MethodSmells methodSmells = jigService.methodSmells(jigRepository); |
107 | 107 |
|
108 | | - var detectedSmells = methodSmellList.list().stream() |
| 108 | + var detectedSmells = methodSmells.list().stream() |
109 | 109 | .filter(methodSmell -> methodSmell.method().declaringType().equals(TypeId.from(SmelledRecord.class))) |
110 | 110 | .toList(); |
111 | 111 |
|
|
0 commit comments