Skip to content

Commit 1d617ae

Browse files
committed
Fix some tests
1 parent 3e101bd commit 1d617ae

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/Sentry.AspNetCore.Tests/SentryMiddlewareTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ public Fixture()
3434
Hub.When(hub => hub.ConfigureScope(Arg.Any<Action<Scope>>()))
3535
.Do(callback => callback.Arg<Action<Scope>>().Invoke(Scope));
3636

37+
Hub.When(hub => hub.ConfigureScope(
38+
Arg.Any<Action<Scope, Arg.AnyType>>(),
39+
Arg.Any<Arg.AnyType>()))
40+
.Do(callInfo =>
41+
{
42+
var action = callInfo[0];
43+
var arg = callInfo[1];
44+
action.GetType().GetMethod("Invoke").Invoke(
45+
action,
46+
[Scope, arg]);
47+
});
48+
3749
Hub.When(hub => hub.CaptureEvent(Arg.Any<SentryEvent>(), Arg.Any<Scope>()))
3850
.Do(_ => Scope.Evaluate());
3951

0 commit comments

Comments
 (0)