public void Defaults_Test()
        {
            var test = new MessageErrorConfiguration();

            Assert.Equal(TimeSpan.FromDays(30), test.MessageAge);
            Assert.Equal(TimeSpan.FromDays(1), test.MonitorTime);
        }
        public void Enabled_Test()
        {
            var test = new MessageErrorConfiguration();

            Assert.True(test.Enabled);
            test.Enabled = false;
            Assert.False(test.Enabled);
        }
        public void MonitorTime_Test(TimeSpan monitorTime)
        {
            var test = new MessageErrorConfiguration
            {
                MonitorTime = monitorTime
            };

            Assert.Equal(monitorTime, test.MonitorTime);
        }
        public void MessageAge_Test(TimeSpan messageAge)
        {
            var test = new MessageErrorConfiguration
            {
                MessageAge = messageAge
            };

            Assert.Equal(messageAge, test.MessageAge);
        }
        public void ReadOnly_Test(TimeSpan monitorTime)
        {
            var test = new MessageErrorConfiguration
            {
                MonitorTime = monitorTime
            };

            Assert.False(test.IsReadOnly);
            test.SetReadOnly();
            Assert.True(test.IsReadOnly);

            Assert.Throws <InvalidOperationException>(
                delegate
            {
                test.MonitorTime = TimeSpan.FromSeconds(1);
            });
        }