本文整理汇总了Java中com.intellij.testIntegration.JavaTestFramework类的典型用法代码示例。如果您正苦于以下问题:Java JavaTestFramework类的具体用法?Java JavaTestFramework怎么用?Java JavaTestFramework使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JavaTestFramework类属于com.intellij.testIntegration包,在下文中一共展示了JavaTestFramework类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onLibrarySelected
import com.intellij.testIntegration.JavaTestFramework; //导入依赖的package包/类
private void onLibrarySelected(TestFramework descriptor) {
if (descriptor.isLibraryAttached(myTargetModule)) {
myFixLibraryPanel.setVisible(false);
}
else {
myFixLibraryPanel.setVisible(true);
String text = CodeInsightBundle.message("intention.create.test.dialog.library.not.found", descriptor.getName());
myFixLibraryLabel.setText(text);
myFixLibraryButton.setVisible(descriptor instanceof JavaTestFramework && ((JavaTestFramework)descriptor).getFrameworkLibraryDescriptor() != null
|| descriptor.getLibraryPath() != null);
}
String superClass = descriptor.getDefaultSuperClass();
if (isSuperclassSelectedManually()) {
if (superClass != null) {
String currentSuperClass = mySuperClassField.getText();
mySuperClassField.appendItem(superClass);
mySuperClassField.setText(currentSuperClass);
}
}
else {
mySuperClassField.appendItem(StringUtil.notNullize(superClass));
mySuperClassField.getChildComponent().setSelectedItem(StringUtil.notNullize(superClass));
}
mySelectedFramework = descriptor;
}
示例2: isTestClass
import com.intellij.testIntegration.JavaTestFramework; //导入依赖的package包/类
protected boolean isTestClass(PsiClass psiClass)
{
if(psiClass != null)
{
JavaTestFramework framework = getCurrentFramework(psiClass);
return framework != null && framework.isTestClass(psiClass);
}
return false;
}
示例3: getCurrentFramework
import com.intellij.testIntegration.JavaTestFramework; //导入依赖的package包/类
protected JavaTestFramework getCurrentFramework(PsiClass psiClass)
{
if(psiClass != null)
{
ConfigurationType configurationType = getConfigurationType();
Set<TestFramework> frameworks = TestFrameworks.detectApplicableFrameworks(psiClass);
return frameworks.stream().filter(framework -> framework instanceof JavaTestFramework && ((JavaTestFramework) framework).isMyConfigurationType(configurationType)).map(framework ->
(JavaTestFramework) framework).findFirst().orElse(null);
}
return null;
}
示例4: TestMethodFilter
import com.intellij.testIntegration.JavaTestFramework; //导入依赖的package包/类
public TestMethodFilter(final PsiClass aClass)
{
myClass = aClass;
TestFramework framework = TestFrameworks.detectFramework(aClass);
this.framework = (framework instanceof JavaTestFramework) ? (JavaTestFramework) framework : null;
}
示例5: isTestMethod
import com.intellij.testIntegration.JavaTestFramework; //导入依赖的package包/类
protected boolean isTestMethod(boolean checkAbstract, PsiMethod method)
{
JavaTestFramework framework = getCurrentFramework(method.getContainingClass());
return framework != null && framework.isTestMethod(method, checkAbstract);
}