Skip to content

Commit 41acafb

Browse files
authored
update verify (#1723)
1 parent 7500c9f commit 41acafb

6 files changed

+16
-22
lines changed

test/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
<PackageReference Include="xunit" Version="2.4.1" />
4242
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
4343
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
44-
<PackageReference Include="Verify.Xunit" Version="16.8.2" />
45-
<PackageReference Include="Verify.DiffPlex" Version="1.2.0" />
44+
<PackageReference Include="Verify.Xunit" Version="17.1.4" />
45+
<PackageReference Include="Verify.DiffPlex" Version="1.3.0" />
4646
<PackageReference Include="PublicApiGenerator" Version="10.3.0" />
4747
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.0" />
4848
</ItemGroup>

test/Sentry.DiagnosticSource.IntegrationTests/VerifyExtensions.cs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@ static class VerifyExtensions
22
{
33
public static SettingsTask IgnoreStandardSentryMembers(this SettingsTask settings)
44
{
5-
return settings.ModifySerialization(
6-
p =>
7-
{
8-
p.AddExtraSettings(x => x.Converters.Add(new SpansConverter()));
9-
p.IgnoreMembersWithType<Contexts>();
10-
p.IgnoreMembersWithType<SdkVersion>();
11-
p.IgnoreMembersWithType<DateTimeOffset>();
12-
p.IgnoreMembersWithType<SpanId>();
13-
p.IgnoreMembersWithType<SentryId>();
14-
p.IgnoreMembers<SentryEvent>(e => e.Modules, e => e.Release);
15-
p.IgnoreMembers<Transaction>(t => t.Release);
16-
p.IgnoreMembers<SentryException>(e => e.Module, e => e.ThreadId);
17-
});
5+
return settings
6+
.AddExtraSettings(x => x.Converters.Add(new SpansConverter()))
7+
.IgnoreMembersWithType<Contexts>()
8+
.IgnoreMembersWithType<SdkVersion>()
9+
.IgnoreMembersWithType<DateTimeOffset>()
10+
.IgnoreMembersWithType<SpanId>()
11+
.IgnoreMembersWithType<SentryId>()
12+
.IgnoreMembers<SentryEvent>(e => e.Modules, e => e.Release)
13+
.IgnoreMembers<Transaction>(t => t.Release)
14+
.IgnoreMembers<SentryException>(e => e.Module, e => e.ThreadId);
1815
}
1916
}

test/Sentry.Tests/Internals/CollectionExtensionsTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ public class CollectionExtensionsTests
77
public Task GetOrCreate_invalid_type()
88
{
99
var dictionary = new ConcurrentDictionary<string, object> {["key"] = 1};
10-
return Throws(() => dictionary.GetOrCreate<Value>("key")).IgnoreStackTrack();
10+
return Throws(() => dictionary.GetOrCreate<Value>("key"))
11+
.IgnoreStackTrace();
1112
}
1213

1314
class Value

test/Sentry.Tests/Internals/MainExceptionProcessorTests.CreateSentryException_Aggregate.verified.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
{
33
Type: System.Exception,
44
Value: Inner message1,
5-
ThreadId: Id_1,
65
Mechanism: {}
76
},
87
{
98
Type: System.Exception,
109
Value: Inner message2,
11-
ThreadId: Id_1,
1210
Mechanism: {}
1311
}
1412
]

test/Sentry.Tests/Internals/MainExceptionProcessorTests.CreateSentryException_Aggregate_Keep.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22
{
33
Type: System.Exception,
44
Value: Inner message1,
5-
ThreadId: Id_1,
65
Mechanism: {}
76
},
87
{
98
Type: System.Exception,
109
Value: Inner message2,
11-
ThreadId: Id_1,
1210
Mechanism: {}
1311
},
1412
{
1513
Type: System.AggregateException,
16-
ThreadId: Id_1,
1714
Mechanism: {}
1815
}
1916
]

test/Sentry.Tests/ModuleInit.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ public static class ModuleInit
66
public static void Init()
77
{
88
VerifyDiffPlex.Initialize();
9-
VerifierSettings.IgnoreMember<SentryException>(_=>_.Module);
9+
VerifierSettings.IgnoreMembers<SentryException>(_ => _.Module, _ => _.ThreadId);
10+
1011
VerifierSettings.MemberConverter<Breadcrumb, IReadOnlyDictionary<string, string>>(
1112
target => target.Data,
1213
(_, value) =>

0 commit comments

Comments
 (0)