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


Java TestConsoleProperties类代码示例

本文整理汇总了Java中com.intellij.execution.testframework.TestConsoleProperties的典型用法代码示例。如果您正苦于以下问题:Java TestConsoleProperties类的具体用法?Java TestConsoleProperties怎么用?Java TestConsoleProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TestConsoleProperties类属于com.intellij.execution.testframework包,在下文中一共展示了TestConsoleProperties类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  final TestConsoleProperties consoleProperties = createConsoleProperties();
  final ExecutionEnvironment environment = new ExecutionEnvironment();

  myMockResettablePrinter = new MockPrinter(true);
  myConsole = new MyConsoleView(consoleProperties, environment);
  myConsole.initUI();
  myResultsViewer = myConsole.getResultsViewer();
  myRootSuite = myResultsViewer.getTestsRootNode();
  myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(consoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");

  myEventsProcessor.onStartTesting();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:SMTRunnerConsoleTest.java

示例2: testSelectFirstDefect_Priority_Pending

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
public void testSelectFirstDefect_Priority_Pending() {
  // Priority: error -> failure
  TestConsoleProperties.SELECT_FIRST_DEFECT.set(myProperties, true);
  mySuite.setStarted();

  final SMTestProxy testsSuite = createSuiteProxy("my suite", mySuite);
  testsSuite.setStarted();

  // pending test
  final SMTestProxy testPending = createTestProxy("testPending", testsSuite);
  testPending.setStarted();
  myUIActionsHandler.onTestNodeAdded(myResultsViewer, testPending);
  testPending.setTestIgnored("", "");

  // finish suite
  testsSuite.setFinished();
  assertNull(mySelectedTestProxy);

  //testing finished
  mySuite.setFinished();
  assertNull(mySelectedTestProxy);

  myUIActionsHandler.onTestingFinished(myResultsViewer);
  // pending tests shouldn't be considered as errors/failures
  assertNull(mySelectedTestProxy);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SMTRunnerUIActionsHandlerTest.java

示例3: setUp

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  myRootSuite = createSuiteProxy("root");

  final TestConsoleProperties consoleProperties = createConsoleProperties();
  final ExecutionEnvironment environment = new ExecutionEnvironment();
  myResultsForm = new SMTestRunnerResultsForm(
    new JLabel(),
                                              consoleProperties
  );
  Disposer.register(myResultsForm, consoleProperties);
  myResultsForm.initUI();
  myStatisticsPanel = myResultsForm.getStatisticsPane();
  myTestEventsListener = myStatisticsPanel.createTestEventsListener();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SMTRunnerStatisticsPanelTest.java

示例4: setUp

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  myConsoleProperties = createConsoleProperties();
  TestConsoleProperties.HIDE_PASSED_TESTS.set(myConsoleProperties, false);
  TestConsoleProperties.OPEN_FAILURE_LINE.set(myConsoleProperties, false);
  TestConsoleProperties.SCROLL_TO_SOURCE.set(myConsoleProperties, false);
  TestConsoleProperties.SELECT_FIRST_DEFECT.set(myConsoleProperties, false);
  TestConsoleProperties.TRACK_RUNNING_TEST.set(myConsoleProperties, false);

  final ExecutionEnvironment environment = new ExecutionEnvironment();

  myConsole = new SMTRunnerConsoleView(myConsoleProperties);
  myConsole.initUI();
  myResultsViewer = myConsole.getResultsViewer();
  myTestsRootNode = myResultsViewer.getTestsRootNode();
  myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(myConsoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");
  myEventsProcessor.addEventsListener(myResultsViewer);
  myTreeModel = myResultsViewer.getTreeView().getModel();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:SMTestRunnerResultsFormTest.java

示例5: testRuby_1767

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
public void testRuby_1767() throws InterruptedException {
  TestConsoleProperties.HIDE_PASSED_TESTS.set(myConsoleProperties, true);

  myEventsProcessor.onStartTesting();
  myEventsProcessor.onSuiteStarted(new TestSuiteStartedEvent("suite", null));
  myResultsViewer.performUpdate();

  myEventsProcessor.onTestStarted(new TestStartedEvent("test_failed", null));
  myResultsViewer.performUpdate();
  myEventsProcessor.onTestFailure(new TestFailedEvent("test_failed", "", "", false, null, null));
  myResultsViewer.performUpdate();
  myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10l));
  myResultsViewer.performUpdate();

  myEventsProcessor.onTestStarted(new TestStartedEvent("test", null));
  myResultsViewer.performUpdate();
  assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0)));

  myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
  assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0)));

  myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite"));
  myEventsProcessor.onFinishTesting();

  assertEquals(1, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0)));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SMTestRunnerResultsFormTest.java

示例6: setUp

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  TestConsoleProperties consoleProperties = createConsoleProperties();
  TestConsoleProperties.HIDE_PASSED_TESTS.set(consoleProperties, false);
  TestConsoleProperties.OPEN_FAILURE_LINE.set(consoleProperties, false);
  TestConsoleProperties.SCROLL_TO_SOURCE.set(consoleProperties, false);
  TestConsoleProperties.SELECT_FIRST_DEFECT.set(consoleProperties, false);
  TestConsoleProperties.TRACK_RUNNING_TEST.set(consoleProperties, false);

  final ExecutionEnvironment environment = new ExecutionEnvironment();
  myMockResettablePrinter = new MockPrinter(true);
  myConsole = new MyConsoleView(consoleProperties, environment);
  myConsole.initUI();
  myResultsViewer = myConsole.getResultsViewer();
  myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(consoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");
  myEventsProcessor.addEventsListener(myResultsViewer);
  myTreeModel = myResultsViewer.getTreeView().getModel();

  myEventsProcessor.onStartTesting();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:GeneralToSMTRunnerEventsConvertorTest.java

示例7: getFilter

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
private static Filter getFilter(TestConsoleProperties properties) {
  final boolean shouldFilterPassed = TestConsoleProperties.HIDE_PASSED_TESTS.value(properties);
  final Filter hidePassedFilter = shouldFilterPassed ? Filter.NOT_PASSED.or(Filter.DEFECT) : Filter.NO_FILTER;

  final boolean shouldFilterIgnored = TestConsoleProperties.HIDE_IGNORED_TEST.value(properties);
  final Filter hideIgnoredFilter;
  if (shouldFilterIgnored) {
    final Filter ignoredFilter = Filter.IGNORED.not();
    hideIgnoredFilter = !shouldFilterPassed ? ignoredFilter.or(Filter.HAS_PASSED) : ignoredFilter;
  }
  else {
    hideIgnoredFilter = Filter.NO_FILTER;
  }

  final boolean hideSuccessfulConfigs = TestConsoleProperties.HIDE_SUCCESSFUL_CONFIG.value(properties);
  final Filter hideConfigsFilter = hideSuccessfulConfigs ? Filter.HIDE_SUCCESSFUL_CONFIGS : Filter.NO_FILTER;

  return hidePassedFilter.and(hideIgnoredFilter).and(hideConfigsFilter);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:TestFrameworkActions.java

示例8: addPropertyListener

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
public static void addPropertyListener(final AbstractProperty<Boolean> property,
                                       final TestFrameworkPropertyListener<Boolean> propertyListener,
                                       final TestFrameworkRunningModel model,
                                       final boolean sendValue) {
  final TestConsoleProperties properties = model.getProperties();
  if (sendValue) {
    properties.addListenerAndSendValue(property, propertyListener);
  }
  else {
    properties.addListener(property, propertyListener);
  }
  Disposer.register(model, new Disposable() {
    public void dispose() {
      properties.removeListener(property, propertyListener);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:TestFrameworkActions.java

示例9: TestResultsPanel

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
protected TestResultsPanel(@NotNull JComponent console, AnAction[] consoleActions, TestConsoleProperties properties,
                           @NotNull String splitterProportionProperty, float splitterDefaultProportion) {
  super(new BorderLayout(0,1));
  myConsole = console;
  myConsoleActions = consoleActions;
  myProperties = properties;
  mySplitterProportionProperty = splitterProportionProperty;
  mySplitterDefaultProportion = splitterDefaultProportion;
  myStatisticsSplitterProportionProperty = mySplitterProportionProperty + "_Statistics";
  final ToolWindowManagerListener listener = new ToolWindowManagerListener() {
    @Override
    public void toolWindowRegistered(@NotNull String id) {
    }

    @Override
    public void stateChanged() {
      final boolean splitVertically = splitVertically();
      myStatusLine.setPreferredSize(splitVertically);
      mySplitter.setOrientation(splitVertically);
      revalidate();
      repaint();
    }
  };
  ToolWindowManagerEx.getInstanceEx(properties.getProject()).addToolWindowManagerListener(listener, this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:TestResultsPanel.java

示例10: setStatisticsComparator

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
public void setStatisticsComparator(TestConsoleProperties properties, boolean sortByStatistics) {
  if (!sortByStatistics) {
    setTestsComparator(TestConsoleProperties.SORT_ALPHABETICALLY.value(properties));
  }
  else {
    setNodeDescriptorComparator(new Comparator<NodeDescriptor>() {
            @Override
            public int compare(NodeDescriptor o1, NodeDescriptor o2) {
              if (o1.getParentDescriptor() == o2.getParentDescriptor() &&
                  o1 instanceof BaseTestProxyNodeDescriptor &&
                  o2 instanceof BaseTestProxyNodeDescriptor) {
                final Long d1 = ((BaseTestProxyNodeDescriptor)o1).getElement().getDuration();
                final Long d2 = ((BaseTestProxyNodeDescriptor)o2).getElement().getDuration();
                return Comparing.compare(d2, d1);
              }
              return 0;
            }
          });
  }
  queueUpdate();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:AbstractTestTreeBuilder.java

示例11: valueChanged

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
public void valueChanged(final TreeSelectionEvent e) {
  if (myUpdateCoverageAlarm.isDisposed()) return;
  if (!TestConsoleProperties.TRACK_CODE_COVERAGE.value(myModel.getProperties()) || !isEnabled()) return;
  myUpdateCoverageAlarm.cancelAllRequests();
  final Project project = myModel.getProperties().getProject();
  final CoverageDataManager coverageDataManager = CoverageDataManager.getInstance(project);
  final CoverageSuitesBundle currentSuite = coverageDataManager.getCurrentSuitesBundle();
  if (currentSuite != null) {
    if (ApplicationManager.getApplication().isDispatchThread()) {
      myUpdateCoverageAlarm.addRequest(new Runnable() {
        public void run() {
          selectSubCoverage();
        }
      }, 300);
    } else {
      if (coverageDataManager.isSubCoverageActive()) coverageDataManager.restoreMergedCoverage(currentSuite);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:TrackCoverageAction.java

示例12: attachRerunFailedTestsAction

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
public static DefaultExecutionResult attachRerunFailedTestsAction(DefaultExecutionResult result) {
  ExecutionConsole console = result.getExecutionConsole();
  if (!(console instanceof SMTRunnerConsoleView)) {
    return result;
  }
  SMTRunnerConsoleView smConsole = (SMTRunnerConsoleView) console;
  TestConsoleProperties consoleProperties = smConsole.getProperties();
  if (!(consoleProperties instanceof BlazeTestConsoleProperties)) {
    return result;
  }
  BlazeTestConsoleProperties properties = (BlazeTestConsoleProperties) consoleProperties;
  AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(smConsole);
  if (action != null) {
    action.init(properties);
    action.setModelProvider(smConsole::getResultsViewer);
    result.setRestartActions(action);
  }
  return result;
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:20,代码来源:SmRunnerUtils.java

示例13: setUp

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  final TestConsoleProperties consoleProperties = createConsoleProperties();
  final ExecutionEnvironment environment = new ExecutionEnvironment();

  myMockResettablePrinter = new MockPrinter(true);
  myConsole = new MyConsoleView(consoleProperties, environment);
  myConsole.initUI();
  myResultsViewer = myConsole.getResultsViewer();
  myRootSuite = myResultsViewer.getTestsRootNode();
  myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(myResultsViewer.getTestsRootNode(), "SMTestFramework");

  myEventsProcessor.onStartTesting();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:SMTRunnerConsoleTest.java

示例14: setUp

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  myProperties = createConsoleProperties();
  myResultsViewer = new MockTestResultsViewer(myProperties, mySuite) {
    @Override
    public void selectAndNotify(@Nullable final AbstractTestProxy proxy) {
      super.selectAndNotify(proxy);
      mySelectedTestProxy = proxy;
    }
  };

  myUIActionsHandler = new SMTRunnerUIActionsHandler(myProperties);

  TestConsoleProperties.HIDE_PASSED_TESTS.set(myProperties, false);
  TestConsoleProperties.OPEN_FAILURE_LINE.set(myProperties, false);
  TestConsoleProperties.SCROLL_TO_SOURCE.set(myProperties, false);
  TestConsoleProperties.SELECT_FIRST_DEFECT.set(myProperties, false);
  TestConsoleProperties.TRACK_RUNNING_TEST.set(myProperties, false);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:SMTRunnerUIActionsHandlerTest.java

示例15: setUp

import com.intellij.execution.testframework.TestConsoleProperties; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();

  myRootSuite = createSuiteProxy("root");

  final TestConsoleProperties consoleProperties = createConsoleProperties();
  final ExecutionEnvironment environment = new ExecutionEnvironment();
  myResultsForm = new SMTestRunnerResultsForm(consoleProperties.getConfiguration(),
                                              new JLabel(),
                                              consoleProperties,
                                              environment);
  myResultsForm.initUI();
  myStatisticsPanel = myResultsForm.getStatisticsPane();
  myTestEventsListener = myStatisticsPanel.createTestEventsListener();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:SMTRunnerStatisticsPanelTest.java


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