Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalk007 committed Sep 17, 2024
1 parent 33369e6 commit 03fd1f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ String createComponentName(PsiElement element) {
List<KtValueArgument> argumentList = ((KtValueArgumentList) element).getArguments();
if (argumentList.size() == 1) {
// "commons-collections:commons-collections:3.2.2"
return extractArgument(argumentList.get(0));
String artifactId = extractArgument(argumentList.get(0));
return StringUtils.substringBeforeLast(artifactId, ":");
}
if (argumentList.size() >= 3) {
// "commons-collections", "commons-collections"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public class GradleInspectionTest {
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{"a:b:c", "a:b"},
{"a:b:c:d", "a:b"},
{"a:b", "a:b"},
{"a:b:c:d", "a:b:c"},
{"a", "a"},
{"xyz", "xyz"}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class GradleKotlinInspectionTest extends InspectionsTestBase {
// files as groovy-script.
private static final String PACKAGE_DESCRIPTOR = "build.gradle.kts";
private final InspectionTestDependency[] DEPENDENCIES = {
new InspectionTestDependency(119, "a", "b:c"),
new InspectionTestDependency(144, "d", "e:f"),
new InspectionTestDependency(119, "a", "b"),
new InspectionTestDependency(144, "d", "e"),
};

private final int[] NON_DEPENDENCIES_POSITIONS = {273, 338};
Expand Down

0 comments on commit 03fd1f8

Please sign in to comment.