Skip to content

Commit

Permalink
fix(service): fix canonicalName generation in JavaAutoTestService #101
Browse files Browse the repository at this point in the history
- Fixed a bug in the `JavaAutoTestService` where the `canonicalName` was not being generated correctly.
- The `name.replace(".java", "")` was replaced with `virtualFile.nameWithoutExtension` to generate the correct `canonicalName`.
  • Loading branch information
phodal committed Mar 19, 2024
1 parent 8793f9f commit 9c4da21
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -38,7 +38,7 @@ class JavaAutoTestService : AutoTestService() {
val name = virtualFile.name

val psiFile: PsiJavaFile = PsiManager.getInstance(project).findFile(virtualFile) as? PsiJavaFile ?: return null
val canonicalName = psiFile.packageName + "." + psiFile.name.replace(".java", "")
val canonicalName = psiFile.packageName + "." + virtualFile.nameWithoutExtension

val runManager = RunManager.getInstance(project)

Expand Down

0 comments on commit 9c4da21

Please sign in to comment.