Esempio n. 1
0
        private MockExceptionLogger SetupExceptionLogger()
        {
            var result = new MockExceptionLogger();

            _ExceptionLoggers.Add(result);

            return(result);
        }
Esempio n. 2
0
        public void UseExceptionLogger_Records_Exception_Logger()
        {
            Assert.AreEqual(0, _Environment.ExceptionLoggers.Count);

            var logger1 = new MockExceptionLogger();

            _Environment.UseExceptionLogger(logger1);
            Assert.AreEqual(1, _Environment.ExceptionLoggers.Count);
            Assert.AreSame(logger1, _Environment.ExceptionLoggers[0]);

            var logger2 = new MockExceptionLogger();

            _Environment.UseExceptionLogger(logger2);
            Assert.AreEqual(2, _Environment.ExceptionLoggers.Count);
            Assert.IsTrue(_Environment.ExceptionLoggers.Contains(logger2));
        }