Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/System.Net.Requests/tests/LoggingTest.cs')
-rw-r--r--src/System.Net.Requests/tests/LoggingTest.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/System.Net.Requests/tests/LoggingTest.cs b/src/System.Net.Requests/tests/LoggingTest.cs
new file mode 100644
index 0000000000..f6f42f0ee0
--- /dev/null
+++ b/src/System.Net.Requests/tests/LoggingTest.cs
@@ -0,0 +1,21 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Diagnostics.Tracing;
+using Xunit;
+
+namespace System.Net.Tests
+{
+ public static class LoggingTest
+ {
+ [Fact]
+ public static void EventSource_ExistsWithCorrectId()
+ {
+ Type esType = typeof(WebRequest).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
+ Assert.NotNull(esType);
+ Assert.Equal("Microsoft-System-Net-Requests", EventSource.GetName(esType));
+ Assert.Equal(Guid.Parse("3763dc7e-7046-5576-9041-5616e21cc2cf"), EventSource.GetGuid(esType));
+ }
+ }
+}