Skip to content

Commit ab18778

Browse files
committed
Substitute both ConfigureScope overloads in mobile tests
1 parent 2456363 commit ab18778

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

test/Sentry.Maui.CommunityToolkit.Mvvm.Tests/MauiCommunityToolkitMvvmEventsBinderTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ private class Fixture
1919
public Fixture()
2020
{
2121
Hub = Substitute.For<IHub>();
22-
Hub.When(h => h.ConfigureScope(Arg.Any<Action<Scope>>()))
23-
.Do(c =>
24-
{
25-
c.Arg<Action<Scope>>()(Scope);
26-
});
22+
Hub.SubstituteConfigureScope(Scope);
2723

2824
Options.Debug = true;
2925
var logger = Substitute.For<IDiagnosticLogger>();

test/Sentry.Maui.Tests/MauiEventsBinderTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ private class Fixture
1717
public Fixture()
1818
{
1919
Hub = Substitute.For<IHub>();
20-
Hub.When(h => h.ConfigureScope(Arg.Any<Action<Scope>>()))
21-
.Do(c =>
22-
{
23-
c.Arg<Action<Scope>>()(Scope);
24-
});
20+
Hub.SubstituteConfigureScope(Scope);
2521

2622
Scope.Transaction = Substitute.For<ITransactionTracer>();
2723

0 commit comments

Comments
 (0)