Esempio n. 1
0
        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();
        }
Esempio n. 3
0
        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));
 }
Esempio n. 6
0
 public NoDefaultTestHighlighting(ITestDeclaration treeNode)
     : base(treeNode, Message)
 {
 }
Esempio n. 7
0
 public DuplicatedTestHighlighting(ITestDeclaration treeNode)
     : base(treeNode, Message)
 {
 }
Esempio n. 8
0
 private UnitTestElementLocation GetUnitTestElementLocation(ITestDeclaration declaration)
 {
     var ranges = declaration.GetRanges();
       return new UnitTestElementLocation(
       declaration.GetSourceFile().ToProjectFile(),
       ranges.NavigationRange.TextRange,
       ranges.ContainingRange.TextRange);
 }
Esempio n. 9
0
 public static Ranges GetRanges(this ITestDeclaration declaration)
 {
     return(TestDeclarationUtility.Instance.GetRanges(declaration));
 }
Esempio n. 10
0
 protected SimpleTestDeclarationHighlightingBase(ITestDeclaration treeNode, [NotNull] string toolTipText)
 {
     _treeNode    = treeNode;
     _toolTipText = toolTipText;
 }
 public DuplicatedTestHighlighting(ITestDeclaration treeNode)
     : base(treeNode, Message)
 {
 }
 protected SimpleTestDeclarationHighlightingBase(ITestDeclaration treeNode, [NotNull] string toolTipText)
 {
     _treeNode = treeNode;
       _toolTipText = toolTipText;
 }
 public NoDefaultTestHighlighting(ITestDeclaration treeNode)
     : base(treeNode, Message)
 {
 }