use of com.jetbrains.lang.dart.psi.DartExpression in project intellij-plugins by JetBrains.
the class TestUtil method findGroupOrTestName.
@Nullable
public static String findGroupOrTestName(@Nullable final DartCallExpression expression) {
String testName;
final DartArguments arguments = expression == null ? null : expression.getArguments();
final DartArgumentList dartArgumentList = arguments == null ? null : arguments.getArgumentList();
if (dartArgumentList == null || dartArgumentList.getExpressionList().isEmpty()) {
return null;
}
final DartExpression dartExpression = dartArgumentList.getExpressionList().get(0);
testName = dartExpression == null ? "" : StringUtil.unquoteString(dartExpression.getText());
return testName;
}
Aggregations