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


Java Marker类代码示例

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


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

示例1: testChangeSelectionAction

import com.intellij.execution.testframework.sm.Marker; //导入依赖的package包/类
public void testChangeSelectionAction() {
  final Marker onSelectedHappend = new Marker();
  final Ref<SMTestProxy> proxyRef = new Ref<SMTestProxy>();
  final Ref<Boolean> focusRequestedRef = new Ref<Boolean>();

  myResultsViewer.setShowStatisticForProxyHandler(new PropagateSelectionHandler() {
    @Override
    public void handlePropagateSelectionRequest(@Nullable final SMTestProxy selectedTestProxy, @NotNull final Object sender,
                                                final boolean requestFocus) {
      onSelectedHappend.set();
      proxyRef.set(selectedTestProxy);
      focusRequestedRef.set(requestFocus);
    }
  });

  final SMTestProxy suite = createSuiteProxy("suite", myTestsRootNode);
  final SMTestProxy test = createTestProxy("test", myTestsRootNode);
  myResultsViewer.onSuiteStarted(suite);
  myResultsViewer.onTestStarted(test);

  //On test
  myResultsViewer.selectAndNotify(test);
  myResultsViewer.showStatisticsForSelectedProxy();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(test, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on suite
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myResultsViewer.selectAndNotify(suite);
  myResultsViewer.showStatisticsForSelectedProxy();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite, proxyRef.get());
  assertTrue(focusRequestedRef.get());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:40,代码来源:SMTestRunnerResultsFormTest.java

示例2: testOnFinishedTesting_twice

import com.intellij.execution.testframework.sm.Marker; //导入依赖的package包/类
public void testOnFinishedTesting_twice() {
  myEventsProcessor.onFinishTesting();

  final Marker finishedMarker = new Marker();
  myEventsProcessor.addEventsListener(new SMTRunnerEventsAdapter(){
    @Override
    public void onTestingFinished(@NotNull SMTestProxy.SMRootTestProxy testsRoot) {
      finishedMarker.set();
    }
  });
  myEventsProcessor.onFinishTesting();
  assertFalse(finishedMarker.isSet());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:GeneralToSMTRunnerEventsConvertorTest.java

示例3: testChangeSelectionAction

import com.intellij.execution.testframework.sm.Marker; //导入依赖的package包/类
public void testChangeSelectionAction() {
  final Marker onSelectedHappend = new Marker();
  final Ref<SMTestProxy> proxyRef = new Ref<>();
  final Ref<Boolean> focusRequestedRef = new Ref<>();

  myResultsViewer.setShowStatisticForProxyHandler(new PropagateSelectionHandler() {
    @Override
    public void handlePropagateSelectionRequest(@javax.annotation.Nullable final SMTestProxy selectedTestProxy, @Nonnull final Object sender,
                                                final boolean requestFocus) {
      onSelectedHappend.set();
      proxyRef.set(selectedTestProxy);
      focusRequestedRef.set(requestFocus);
    }
  });

  final SMTestProxy suite = createSuiteProxy("suite", myTestsRootNode);
  final SMTestProxy test = createTestProxy("test", myTestsRootNode);
  myResultsViewer.onSuiteStarted(suite);
  myResultsViewer.onTestStarted(test);

  //On test
  myResultsViewer.selectAndNotify(test);
  myResultsViewer.showStatisticsForSelectedProxy();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(test, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on suite
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myResultsViewer.selectAndNotify(suite);
  myResultsViewer.showStatisticsForSelectedProxy();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite, proxyRef.get());
  assertTrue(focusRequestedRef.get());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:40,代码来源:SMTestRunnerResultsFormTest.java

示例4: testOnFinishedTesting_twice

import com.intellij.execution.testframework.sm.Marker; //导入依赖的package包/类
public void testOnFinishedTesting_twice() {
  myEventsProcessor.onFinishTesting();

  final Marker finishedMarker = new Marker();
  myEventsProcessor.addEventsListener(new SMTRunnerEventsAdapter(){
    @Override
    public void onTestingFinished(@Nonnull SMTestProxy.SMRootTestProxy testsRoot) {
      finishedMarker.set();
    }
  });
  myEventsProcessor.onFinishTesting();
  assertFalse(finishedMarker.isSet());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:GeneralToSMTRunnerEventsConvertorTest.java

示例5: testChangeSelectionAction

import com.intellij.execution.testframework.sm.Marker; //导入依赖的package包/类
public void testChangeSelectionAction() {
  final Marker onSelectedHappend = new Marker();
  final Ref<SMTestProxy> proxyRef = new Ref<SMTestProxy>();
  final Ref<Boolean> focusRequestedRef = new Ref<Boolean>();

  myStatisticsPanel.addPropagateSelectionListener(new PropagateSelectionHandler() {
    @Override
    public void handlePropagateSelectionRequest(@Nullable final SMTestProxy selectedTestProxy, @NotNull final Object sender,
                                  final boolean requestFocus) {
      onSelectedHappend.set();
      proxyRef.set(selectedTestProxy);
      focusRequestedRef.set(requestFocus);
    }
  });

  // create data fixture
  final SMTestProxy rootSuite = createSuiteProxy("rootSuite");
  final SMTestProxy suite1 = createSuiteProxy("suite1", rootSuite);
  final SMTestProxy test1 = createTestProxy("test1", suite1);

  //on test
  myStatisticsPanel.selectProxy(suite1);
  myStatisticsPanel.selectRow(0);
  assertEquals(test1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(test1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on suite
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(0);
  assertEquals(suite1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on Total
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(0);
  assertEquals(suite1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite1, proxyRef.get());
  assertTrue(focusRequestedRef.get());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:61,代码来源:SMTRunnerStatisticsPanelTest.java

示例6: testChangeSelectionAction

import com.intellij.execution.testframework.sm.Marker; //导入依赖的package包/类
public void testChangeSelectionAction() {
  final Marker onSelectedHappend = new Marker();
  final Ref<SMTestProxy> proxyRef = new Ref<SMTestProxy>();
  final Ref<Boolean> focusRequestedRef = new Ref<Boolean>();

  myStatisticsPanel.addPropagateSelectionListener(new PropagateSelectionHandler() {
    @Override
    public void handlePropagateSelectionRequest(@Nullable final SMTestProxy selectedTestProxy, @Nonnull final Object sender, final boolean requestFocus) {
      onSelectedHappend.set();
      proxyRef.set(selectedTestProxy);
      focusRequestedRef.set(requestFocus);
    }
  });

  // create data fixture
  final SMTestProxy rootSuite = createSuiteProxy("rootSuite");
  final SMTestProxy suite1 = createSuiteProxy("suite1", rootSuite);
  final SMTestProxy test1 = createTestProxy("test1", suite1);

  //on test
  myStatisticsPanel.selectProxy(suite1);
  myStatisticsPanel.selectRow(1);
  assertEquals(test1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(test1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on suite
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(1);
  assertEquals(suite1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on Total
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(0);
  assertEquals(rootSuite, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(rootSuite, proxyRef.get());
  assertTrue(focusRequestedRef.get());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:60,代码来源:SMTRunnerStatisticsPanelTest.java


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