public void HandleClusterDescriptionChangedEventShould_Log_To_File()
        {
            const string traceSourceName = "HandleClusterDescriptionChangedEventShould_Log_To_File";
            const string logFileName     = traceSourceName + "-log";
            var          ipAddress       = new IPEndPoint(IPAddress.Parse("1.2.3.4"), 42);
            var          @event          = new ClusterDescriptionChangedEvent(
#pragma warning disable CS0618 // Type or member is obsolete
                oldDescription: new ClusterDescription(
                    new ClusterId(),
                    ClusterConnectionMode.Automatic,
                    ClusterType.Unknown,
                    new ServerDescription[] { }),
                newDescription: new ClusterDescription(
                    new ClusterId(),
                    ClusterConnectionMode.Direct,
                    ClusterType.Standalone,
                    new ServerDescription[] { new ServerDescription(new ServerId(new ClusterId(), ipAddress), ipAddress) }));

#pragma warning restore CS0618 // Type or member is obsolete
            var expectedLogMessage =
                $"{TraceSourceEventHelper.Label(@event.OldDescription.ClusterId)}: {@event.NewDescription}";
            var traceSource = CreateTraceSource(logFileName, logFileName);
            var subject     = new TraceSourceSdamEventSubscriber(traceSource);

            subject.Handle(@event);
            var log = ReadLog(traceSource, logFileName);

            log.Should().Contain(expectedLogMessage);
        }
 public static void Handle(this TraceSourceSdamEventSubscriber subject, ClusterDescriptionChangedEvent @event)
 => Reflector.Invoke(subject, "Handle", @event);