public void ParseFromExpressionIntOrNull_IncorrectScenario()
 {
     foreach (var expression in BadExpressions)
     {
         var result = NumericValueParser.ParseFromExpressionIntOrNull(expression);
         Assert.IsNull(result, $"incorrect result : {result} | parse mistakenly passed on \"{expression.ToFullString()}\"");
     }
 }
 public void ParseFromExpressionIntOrNull_NormalScenario()
 {
     foreach (var sample in GoodSamples)
     {
         var result = NumericValueParser.ParseFromExpressionIntOrNull(sample.Expression);
         Assert.AreEqual(result, sample.Correct, $"expected {sample.Correct} but {result} | on \"{sample.Expression.ToFullString()}\"");
     }
 }
 private static IEnumerable <Tuple <InvocationExpressionSyntax, int?> > GetFirstArgConstInt(IEnumerable <InvocationExpressionSyntax> invocations)
 {
     return(invocations.Select(g => Tuple.Create(g, NumericValueParser.ParseFromExpressionIntOrNull(g.GetArgumentExpressionAt(0)))));
 }