mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 19:02:13 +07:00
gradle: test added for TestModuleProperties importing
This commit is contained in:
+19
-5
@@ -16,17 +16,16 @@
|
||||
package org.jetbrains.plugins.gradle.importing;
|
||||
|
||||
import com.intellij.compiler.CompilerConfiguration;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.LanguageLevelModuleExtensionImpl;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.roots.TestModuleProperties;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.util.PathUtil;
|
||||
import org.gradle.util.GradleVersion;
|
||||
import org.junit.Test;
|
||||
import org.junit.runners.Parameterized;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Vladislav.Soroka
|
||||
@@ -44,6 +43,21 @@ public class GradleMiscImportingTest extends GradleImportingTestCase {
|
||||
return Arrays.asList(new Object[][]{{BASE_GRADLE_VERSION}});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTestModuleProperties() throws Exception {
|
||||
importProject(
|
||||
"apply plugin: 'java'"
|
||||
);
|
||||
|
||||
assertModules("project", "project_main", "project_test");
|
||||
|
||||
final Module testModule = getModule("project_test");
|
||||
TestModuleProperties testModuleProperties = TestModuleProperties.getInstance(testModule);
|
||||
assertEquals("project_main", testModuleProperties.getProductionModuleName());
|
||||
|
||||
final Module productionModule = getModule("project_main");
|
||||
assertSame(productionModule, testModuleProperties.getProductionModule());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInheritProjectJdkForModules() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user