示例#1
0
        public void WriteToTrace_can_be_used_to_send_log_entries_to_trace()
        {
            var traces = new List <string>();
            var name   = Any.FullName();

            using (var listener = TraceListener.Create(traces.Add))
                using (Log.Events().WriteToTrace())
                {
                    Log.Write(name);
                }

            traces.Should().Contain(name);
        }