本文整理汇总了Java中com.intellij.testFramework.builders.JavaModuleFixtureBuilder.addLibrary方法的典型用法代码示例。如果您正苦于以下问题:Java JavaModuleFixtureBuilder.addLibrary方法的具体用法?Java JavaModuleFixtureBuilder.addLibrary怎么用?Java JavaModuleFixtureBuilder.addLibrary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.testFramework.builders.JavaModuleFixtureBuilder
的用法示例。
在下文中一共展示了JavaModuleFixtureBuilder.addLibrary方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@BeforeMethod
public void setUp() throws Exception {
JavaTestFixtureFactory.getFixtureFactory(); // registers Java module fixture builder
final IdeaTestFixtureFactory fixtureFactory = IdeaTestFixtureFactory.getFixtureFactory();
final TestFixtureBuilder<IdeaProjectTestFixture> testFixtureBuilder = fixtureFactory.createFixtureBuilder(getClass().getSimpleName());
myFixture = fixtureFactory.createTempDirTestFixture();
myFixture.setUp();
FileUtil.copyDir(new File(PluginPathManager.getPluginHomePath("testng") + "/testData/runConfiguration/module1"),
new File(myFixture.getTempDirPath()), false);
myProjectFixture = testFixtureBuilder.getFixture();
final JavaModuleFixtureBuilder javaModuleFixtureBuilder = testFixtureBuilder.addModule(JavaModuleFixtureBuilder.class);
javaModuleFixtureBuilder.addContentRoot(myFixture.getTempDirPath()).addSourceRoot("src");
javaModuleFixtureBuilder.addLibrary("testng", PathUtil.getJarPathForClass(AfterMethod.class));
myProjectFixture.setUp();
}
示例2: setUp
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@BeforeMethod
public void setUp() throws Exception {
JavaTestFixtureFactory.getFixtureFactory(); // registers Java module fixture builder
final IdeaTestFixtureFactory fixtureFactory = IdeaTestFixtureFactory.getFixtureFactory();
final TestFixtureBuilder<IdeaProjectTestFixture> testFixtureBuilder = fixtureFactory.createFixtureBuilder();
myFixture = fixtureFactory.createTempDirTestFixture();
myFixture.setUp();
FileUtil.copyDir(new File(PluginPathManager.getPluginHomePath("testng") + "/testData/runConfiguration/module1"),
new File(myFixture.getTempDirPath()), false);
myProjectFixture = testFixtureBuilder.getFixture();
final JavaModuleFixtureBuilder javaModuleFixtureBuilder = testFixtureBuilder.addModule(JavaModuleFixtureBuilder.class);
javaModuleFixtureBuilder.addContentRoot(myFixture.getTempDirPath()).addSourceRoot("src");
javaModuleFixtureBuilder.addLibrary("testng", PathUtil.getJarPathForClass(AfterMethod.class));
myProjectFixture.setUp();
}
示例3: tuneFixture
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@Override
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) throws Exception {
moduleBuilder.addLibrary("junit3", JavaSdkUtil.getJunit3JarPath());
moduleBuilder.addLibrary("junit4", ArrayUtil.toStringArray(JavaSdkUtil.getJUnit4JarPaths()));
moduleBuilder.addLibrary("ideaRt", JavaSdkUtil.getIdeaRtJarPath());
moduleBuilder.addLibrary("empty");
}
示例4: tuneFixture
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@Override
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) throws Exception {
String pathForClass = PathUtil.getJarPathForClass(LocalInspectionEP.class);
moduleBuilder.addLibrary("lang-api", pathForClass);
String platformApiJar = PathUtil.getJarPathForClass(JBList.class);
moduleBuilder.addLibrary("platform-api", platformApiJar);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:DescriptionTypeRelatedItemLineMarkerProviderTest.java
示例5: tuneFixture
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@Override
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) throws Exception {
String extensionsJar = PathUtil.getJarPathForClass(ExtensionPointName.class);
moduleBuilder.addLibrary("extensions", extensionsJar);
String platformApiJar = PathUtil.getJarPathForClass(JBList.class);
moduleBuilder.addLibrary("platform-api", platformApiJar);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ExtensionPointDeclarationRelatedItemLineMarkerProviderTest.java
示例6: tuneFixture
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@Override
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) throws Exception {
moduleBuilder.addLibrary("testng", PathUtil.getJarPathForClass(DataProvider.class));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DuplicatedDataProviderNamesInspectionTest.java
示例7: tuneFixture
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@Override
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) throws Exception {
moduleBuilder.setMockJdkLevel(JavaModuleFixtureBuilder.MockJdkLevel.jdk15);
moduleBuilder.addLibrary("junit", PathUtil.getJarPathForClass(TestCase.class));
moduleBuilder.addLibrary("testng", PathUtil.getJarPathForClass(AfterMethod.class));
}
示例8: tuneFixture
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; //导入方法依赖的package包/类
@Override
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) throws Exception {
String pathForClass = PathUtil.getJarPathForClass(LocalInspectionEP.class);
moduleBuilder.addLibrary("lang-api", pathForClass);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:InspectionMappingConsistencyInspectionTest.java