public void AplusBapproved()
        {
            var a = 2;
            var b = 5;

            ApprovalTest.Verify(annotator.AnnotatedToCode(() => a + b));
        }
Пример #2
0
 static string AnnotateAsAssertion <T>(Expression <Func <T> > expr) => annotator.AnnotatedToCode(expr.Body, "assertion failed", true);
Пример #3
0
 public static string AnnotatedToCode <T>(this IAnnotatedToCode it, Expression <Func <T> > e, string?msg, bool outerValueIsAssertionFailure)
 // ReSharper disable once RedundantCast
 => it.AnnotatedToCode((Expression)e, msg, outerValueIsAssertionFailure);
Пример #4
0
 public static string AnnotatedToCode <T>(this IAnnotatedToCode it, Expression <Func <T> > e)
 => it.AnnotatedToCode(e, null, false);
Пример #5
0
 public static string AnnotatedToCode(this IAnnotatedToCode it, Expression e)
 => it.AnnotatedToCode(e, null, false);
Пример #6
0
 public static string AnnotatedToCode <T>(this IAnnotatedToCode it, Expression <Func <T> > e, string msg, bool hideOutermostValue)
 => it.AnnotatedToCode((Expression)e, msg, hideOutermostValue);