Skip to content

Commit 4060404

Browse files
committed
Added a unit test to verify that reference ids are used.
1 parent c09b390 commit 4060404

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Source/Tests/Plugins/PluginTests.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,22 @@ public void CanCancel() {
7878
Assert.Equal(0, context.Event.Tags.Count);
7979
}
8080

81+
[Fact]
82+
public void ShouldUseReferenceIds() {
83+
var client = new ExceptionlessClient();
84+
foreach (var plugin in client.Configuration.Plugins)
85+
client.Configuration.RemovePlugin(plugin.Key);
86+
87+
var context = new EventPluginContext(client, new Event { Type = Event.KnownTypes.Error });
88+
EventPluginManager.Run(context);
89+
Assert.Null(context.Event.ReferenceId);
90+
91+
client.Configuration.UseReferenceIds();
92+
context = new EventPluginContext(client, new Event { Type = Event.KnownTypes.Error });
93+
EventPluginManager.Run(context);
94+
Assert.NotNull(context.Event.ReferenceId);
95+
}
96+
8197
[Fact]
8298
public void VerifyPriority() {
8399
var config = new ExceptionlessConfiguration(DependencyResolver.CreateDefault());

0 commit comments

Comments
 (0)