forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoggingTest.cs
More file actions
25 lines (21 loc) · 1015 Bytes
/
LoggingTest.cs
File metadata and controls
25 lines (21 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// 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 class WebHeaderCollectionLoggingTest
{
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core")]
public void EventSource_ExistsWithCorrectId()
{
Type esType = typeof(WebHeaderCollection).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false);
Assert.NotNull(esType);
Assert.Equal("Microsoft-System-Net-WebHeaderCollection", EventSource.GetName(esType));
Assert.Equal(Guid.Parse("fd36452f-9f2b-5850-d212-6c436231e3dc"), EventSource.GetGuid(esType));
Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location));
}
}
}