コード例 #1
0
        public void AcceptOnlyRequestRecords()
        {
            var queue = new GrowingQueue("request")
            {
                RecordFactory.Create(0, RecordType.Record, LogLevel.Trace)
            };

            var filter = new RequestQueueFilter(LogLevel.Trace);
            var result = filter.Filter(queue);

            Assert.AreEqual(1, result.Count);
        }
コード例 #2
0
        public void IgnoreCliQueue()
        {
            var queue = new GrowingQueue(Constants.CliTraceIdentifierPrefix)
            {
                RecordFactory.Create(0, RecordType.Record, LogLevel.Critical)
            };

            var filter = new RequestQueueFilter(LogLevel.Trace);
            var result = filter.Filter(queue);

            Assert.AreEqual(0, result.Count);
        }
コード例 #3
0
        public void AcceptOnlyRequestRecordsWithMinimalLogSeverity(LogLevel messageSeverity, LogLevel minimalSeverity, bool isLogged)
        {
            var queue = new GrowingQueue("request")
            {
                RecordFactory.Create(0, RecordType.Record, messageSeverity)
            };

            var filter = new RequestQueueFilter(minimalSeverity);
            var result = filter.Filter(queue);

            Assert.AreEqual(isLogged ? 1 : 0, result.Count);
        }