示例#1
0
        public void TestResizeShrink()
        {
            for (var i = 0; i < 10000; i++)
            {
                _subject.AddEntry(new LogEntry {
                    ErrorMessage = i.ToString(CultureInfo.InvariantCulture)
                });
            }

            _subject.Resize(200);
            Assert.AreEqual(200, _subject.Entries().Count());
            Assert.AreEqual("9800", _subject.Entries().First().ErrorMessage);
            Assert.AreEqual("9999", _subject.Entries().Last().ErrorMessage);
        }