/// <summary>
        /// [TestMethod] -> [Fact]
        /// [Ignore("reason")] -> [Fact(Skip = "reason")]
        /// [Description("name")] -> [Fact(DisplayName = "name")]
        /// </summary>
        /// <param name="method"></param>
        /// <returns></returns>
        internal static MethodDeclarationSyntax StripSurjectiveFactAttributes(this MethodDeclarationSyntax method, SyntaxAnnotation annotation)
        {
            var attr = method.GetTargetAttribute("TestMethod");

            if (attr == null)
            {
                return(method);
            }

            var factAttribute = attr.WithName(IdentifierName("Fact"));

            var description = method.GetTargetAttribute("Description");

            if (description != null)
            {
                factAttribute = factAttribute.WithArgumentList(CreateArgumentList("DisplayName", description, factAttribute.ArgumentList).WithAdditionalAnnotations(annotation));
                method        = method.RemoveNode(method.GetTargetAttribute("Description"), SyntaxRemoveOptions.KeepExteriorTrivia);
            }

            var ignore = method.GetTargetAttribute("Ignore");

            if (ignore != null)
            {
                factAttribute = factAttribute.WithArgumentList(CreateArgumentList("Skip", ignore, factAttribute.ArgumentList).WithAdditionalAnnotations(annotation));
                method        = method.RemoveNode(method.GetTargetAttribute("Ignore"), SyntaxRemoveOptions.KeepExteriorTrivia);
            }

            attr   = method.GetTargetAttribute("TestMethod");
            method = method.ReplaceNode(attr, factAttribute).WithAdditionalAnnotations(annotation);

            return(method.Cleanup());
        }
        internal static MethodDeclarationSyntax StripExpectedExceptionAttribute(this MethodDeclarationSyntax method, SyntaxAnnotation annotation)
        {
            var target = method.GetTargetAttribute("ExpectedException");

            if (target == null)
            {
                return(method);
            }

            var arg = target.ArgumentList.Arguments.FirstOrDefault();
            var exceptionIdentifierName = arg?.ChildNodes().FirstOrDefault()?.ChildNodes().FirstOrDefault();

            if (exceptionIdentifierName == null)
            {
                return(method);
            }                                                       //TODO: Throw exception? not valid MSTest if we get here

            var newbody = $"Assert.Throws<{exceptionIdentifierName}>({ParenthesizedLambdaExpression(method.Body)});";

            var statements = new List <StatementSyntax>();

            if (target.ArgumentList.Arguments.Count > 1)
            {
                statements.Add(ParseStatement($"var ex = {newbody}{Environment.NewLine}"));
                statements.Add(ParseStatement($"Assert.Equal({target.ArgumentList.Arguments.ElementAt(1)}, ex.Message);"));
            }
            else
            {
                statements.Add(ParseStatement(newbody));
            }

            statements = statements.Select(s => s.WithAdditionalAnnotations(annotation)).ToList();
            method     = method.ReplaceNode(method.Body, Block(statements)).WithAdditionalAnnotations(annotation);

            //Refresh reference
            target = method.GetTargetAttribute("ExpectedException");
            method = method.RemoveNode(target, SyntaxRemoveOptions.KeepExteriorTrivia);
            method = method.WithAdditionalAnnotations(annotation);

            return(method.Cleanup());
        }