Skip to content

Commit

Permalink
Add scrubbers to Verified tests (compensate for compiler generated me…
Browse files Browse the repository at this point in the history
…thod sigs)
  • Loading branch information
daningalla committed Dec 14, 2021
1 parent 9284601 commit 2ab6437
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
9 changes: 7 additions & 2 deletions test/Infrastructure/SharedSettings.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
using VerifyTests;
using System.Text.RegularExpressions;
using VerifyTests;

namespace Vertical.SpectreLogger.Tests.Infrastructure
{
public static class SharedSettings
{
public static readonly VerifySettings Verifier = Factory.New<VerifySettings>(() =>
public static readonly VerifySettings Verifier = Factory.New(() =>
{
var settings = new VerifySettings();
settings.UniqueForRuntime();
settings.UseDirectory("Verified");
settings.ScrubLinesWithReplace(src => Regex.Replace(
src,
@"b__\d+_\d+\(",
"b__ANY("));
return settings;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ System.AggregateException: One or more errors occurred. (Sequence contains no el
-> System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[[TSource]](IEnumerable`1)
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__0_0() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__ANY() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object)
at System.Threading.Tasks.Task.<>c.<.cctor>b__ANY(Object)
+4 more...
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ System.AggregateException: One or more errors occurred. (Sequence contains no el
-> System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[[TSource]](source)
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__0_0() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__ANY() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(obj)
at System.Threading.Tasks.Task.<>c.<.cctor>b__ANY(obj)
+4 more...
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ System.AggregateException: One or more errors occurred. (Sequence contains no el
-> System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[[TSource]](IEnumerable`1 source)
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__0_0() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__ANY() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
at System.Threading.Tasks.Task.<>c.<.cctor>b__ANY(Object obj)
+4 more...
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ System.AggregateException: One or more errors occurred. (Sequence contains no el
-> System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[[TSource]](IEnumerable`1 source)
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__0_0()
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__ANY()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
at System.Threading.Tasks.Task.<>c.<.cctor>b__ANY(Object obj)
+4 more...
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ System.AggregateException: One or more errors occurred. (Sequence contains no el
-> System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[[TSource]](IEnumerable`1 source)
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__0_0() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__ANY() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
at System.Threading.Tasks.Task.<>c.<.cctor>b__ANY(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ System.AggregateException: One or more errors occurred. (Sequence contains no el
-> System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[[TSource]](IEnumerable`1 source)
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__0_0() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at Vertical.SpectreLogger.Tests.Infrastructure.ExceptionHelper.<>c.<GetAggregateException>b__ANY() in {ProjectDirectory}Infrastructure/ExceptionHelper.cs:line {line}
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__271_0(Object obj)
at System.Threading.Tasks.Task.<>c.<.cctor>b__ANY(Object obj)
+4 more...

0 comments on commit 2ab6437

Please sign in to comment.