public void OperationStart_CorrectEventContent() { var source = new DiagnosticListener("Autofac"); var subscriber = new MockSubscriber(); subscriber.Enable(DiagnosticEventKeys.OperationStart); source.Subscribe(subscriber, subscriber.IsEnabled); var operation = MockResolveOperation(); var request = MockResolveRequest(); source.OperationStart(operation, request); var e = Assert.Single(subscriber.Events); Assert.Equal(DiagnosticEventKeys.OperationStart, e.Key); Assert.IsType <OperationStartDiagnosticData>(e.Value); }