private UnitTestElementLocation GetUnitTestElementLocation(ITestDeclaration declaration) { var ranges = declaration.GetRanges(); return(new UnitTestElementLocation( declaration.GetSourceFile().ToProjectFile(), ranges.NavigationRange.TextRange, ranges.ContainingRange.TextRange)); }
public Ranges GetRanges(ITestDeclaration declaration) { if (declaration is IClassDeclaration) return GetUnitTestElementLocation((IClassDeclaration) declaration); if (declaration is IExpressionStatement) return GetUnitTestElementLocation((IExpressionStatement) declaration); if (declaration is IInvocationExpression) return GetUnitTestElementLocation((IInvocationExpression) declaration); throw new Exception(); }
public Ranges GetRanges(ITestDeclaration declaration) { if (declaration is IDeclaration) { return(GetUnitTestElementLocation((IDeclaration)declaration)); } if (declaration is IExpressionStatement) { return(GetUnitTestElementLocation((IExpressionStatement)declaration)); } if (declaration is IInvocationExpression) { return(GetUnitTestElementLocation((IInvocationExpression)declaration)); } throw new Exception(); }
public UnitTestElementLocation GetTestElementLocation(ITestDeclaration declaration) { if (declaration is IClassDeclaration) { return(GetUnitTestElementLocation((IClassDeclaration)declaration)); } if (declaration is IExpressionStatement) { return(GetUnitTestElementLocation((IExpressionStatement)declaration)); } if (declaration is IInvocationExpression) { return(GetUnitTestElementLocation((IInvocationExpression)declaration)); } throw new Exception(); }
public static UnitTestElementLocation GetTestElementLocation(this ITestDeclaration declaration) { return(UnitTestDeclarationUtility.Instance.GetTestElementLocation(declaration)); }
public NoDefaultTestHighlighting(ITestDeclaration treeNode) : base(treeNode, Message) { }
public DuplicatedTestHighlighting(ITestDeclaration treeNode) : base(treeNode, Message) { }
private UnitTestElementLocation GetUnitTestElementLocation(ITestDeclaration declaration) { var ranges = declaration.GetRanges(); return new UnitTestElementLocation( declaration.GetSourceFile().ToProjectFile(), ranges.NavigationRange.TextRange, ranges.ContainingRange.TextRange); }
public static Ranges GetRanges(this ITestDeclaration declaration) { return(TestDeclarationUtility.Instance.GetRanges(declaration)); }
protected SimpleTestDeclarationHighlightingBase(ITestDeclaration treeNode, [NotNull] string toolTipText) { _treeNode = treeNode; _toolTipText = toolTipText; }