[groovy] IDEA-327339 convert groovy classes to java

- fix small issues

GitOrigin-RevId: c7dd99229e4112089419ab83e3702f3de8f71a99
This commit is contained in:
Mikhail Pyltsin
2024-10-10 18:11:56 +02:00
committed by intellij-monorepo-bot
parent 1512d52efd
commit bb07f96573

View File

@@ -1,10 +1,9 @@
// Copyright 2000-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.groovy.ext.spock;
import com.intellij.codeInsight.TestFrameworks;
import com.intellij.testFramework.DumbModeTestUtils;
import com.intellij.testFramework.LightProjectDescriptor;
import org.codehaus.groovy.runtime.DefaultGroovyMethods;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.groovy.GroovyProjectDescriptors;
import org.jetbrains.plugins.groovy.LightGroovyTestCase;
@@ -39,7 +38,7 @@ public class SpockLineMarkersTest extends LightGroovyTestCase {
map.put("methodWithoutLabels", false);
map.put("methodWithAnotherLabel", false);
map.put("method with spaces ok", true);
GrTypeDefinition spec = DefaultGroovyMethods.first(file.getTypeDefinitions());
GrTypeDefinition spec = file.getTypeDefinitions()[0];
for (GrMethod method : spec.getCodeMethods()) {
String name = method.getName();
Assertions.assertEquals(map.get(name), TestFrameworks.getInstance().isTestMethod(method));
@@ -60,7 +59,7 @@ public class SpockLineMarkersTest extends LightGroovyTestCase {
map.put("methodWithoutLabels", false);
map.put("methodWithAnotherLabel", false);
map.put("method with spaces ok", true);
GrTypeDefinition spec = DefaultGroovyMethods.first(file.getTypeDefinitions());
GrTypeDefinition spec = file.getTypeDefinitions()[0];
DumbModeTestUtils.runInDumbModeSynchronously(getProject(), () -> {
for (GrMethod method : spec.getCodeMethods()) {
String name = method.getName();