public TestMethodTreeNode(@NotNull Project project, @NotNull ITestNodeWrapper testMethod) { super(project); setUserObject(testMethod); myTestMethod = testMethod; setNodeIdentifier(myTestMethod.getNodePointer().toString()); setText(myTestMethod.getName()); }
@Override public void doubleClick() { new EditorNavigator(myProject) .shallFocus(true) .shallSelect(true) .open(myTestMethod.getNodePointer()); }
private Iterable<String> selectNames(List<ITestNodeWrapper> tests) { List<String> result = ListSequence.fromList(new ArrayList<String>()); for (final ITestNodeWrapper test : ListSequence.fromList(tests)) { if (test.isTestCase()) { ListSequence.fromList(result) .addSequence( Sequence.fromIterable(test.getTestMethods()) .select( new ISelector<ITestNodeWrapper, String>() { public String select(ITestNodeWrapper method) { return test.getFqName() + "." + method.getName(); } })); } else { ListSequence.fromList(result) .addElement(test.getTestCase().getFqName() + "." + test.getName()); } } return result; }