public void accept_entries_that_got_an_exception()
        {
            var sut = new ExceptionsOnly();
            var entry = new LogEntry(LogLevel.Trace, "kkjlsdfkl", new Exception());

            var actual = sut.IsSatisfiedBy(entry);

            Assert.AreEqual(actual, true);
        }
        public void reject_entry_without_exception()
        {
            var sut = new ExceptionsOnly();
            var entry = new LogEntry(LogLevel.Trace, "kkjlsdfkl", null);

            var actual = sut.IsSatisfiedBy(entry);

            Assert.AreEqual(actual, false);
        }
        public void higher_level_is_inclusive()
        {
            var sut = new LogLevelFilter();
            sut.MaxLevel = LogLevel.Warning;
            var entry = new LogEntry(LogLevel.Warning, "kksdl", null);

            var actual = sut.IsSatisfiedBy(entry);

            Assert.AreEqual(actual, true);
        }
        public void higher_level_rejects_those_above()
        {
            var sut = new LogLevelFilter();
            sut.MaxLevel = LogLevel.Info;
            var entry = new LogEntry(LogLevel.Warning, "kksdl", null);

            var actual = sut.IsSatisfiedBy(entry);

            Assert.AreEqual(actual, false);
        }
        public void lower_level_is_accepting_above_ones()
        {
            var sut = new LogLevelFilter();
            sut.MinLevel = LogLevel.Info;
            var entry = new LogEntry(LogLevel.Warning, "kksdl", null);

            var actual = sut.IsSatisfiedBy(entry);

            Assert.AreEqual(actual, true);
        }
        public void lower_level_rejects_those_under()
        {
            var sut = new LogLevelFilter();
            sut.MinLevel = LogLevel.Warning;
            var entry = new LogEntry(LogLevel.Info, "kksdl", null);

            var actual = sut.IsSatisfiedBy(entry);

            Assert.AreEqual(actual, false);
        }
 public override void Write(LogEntry entry)
 {
     Entries.Add(entry);
 }
        public void higher_level_is_accepting_below_ones()
        {
            var sut = new LogLevelFilter();
            sut.MaxLevel = LogLevel.Info;
            var entry = new LogEntry(LogLevel.Debug, "kksdl", null);

            var actual = sut.IsSatisfiedBy(entry);

            Assert.AreEqual(actual, true);
        }