本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}