Пример #1
0
        public void CallWithUnknownActionReportsCatchAllOperation()
        {
            TestTelemetryChannel.Clear();
            var host = new HostingContext <SimpleService, ISimpleService>();

            using ( host )
            {
                host.Open();

                ISimpleService client = host.GetChannel();
                using (OperationContextScope scope = new OperationContextScope((IContextChannel)client))
                {
                    OperationContext.Current.OutgoingMessageHeaders.Action = "http://someaction";
                    client.CatchAllOperation();
                }
            }
            var evt = TestTelemetryChannel.CollectedData().First();

            Assert.AreEqual("ISimpleService.CatchAllOperation", evt.Context.Operation.Name);
        }