当前位置: 首页>>代码示例>>Java>>正文


Java JavaTestFramework类代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:CreateTestDialog.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:AbstractJavaTestConfigurationProducer.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:12,代码来源:AbstractJavaTestConfigurationProducer.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:7,代码来源:JUnitUtil.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:AbstractJavaTestConfigurationProducer.java


注:本文中的com.intellij.testIntegration.JavaTestFramework类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。