Beispiel #1
0
        public void Clear()
        {
            var coll = new RowErrorCollection(5);

            coll.Add(this, new WarningEventArgs(1, 1, "Message1", 100, 100, "ColName"));
            Assert.AreEqual(1, coll.CountRows);
            coll.Clear();
            Assert.AreEqual(0, coll.CountRows);
        }
        public void WarningListAddAndClear()
        {
            var messageList = new RowErrorCollection();

            Assert.AreEqual(0, messageList.CountRows);

            messageList.Add(null, new WarningEventArgs(1, 2, "Line1", 0, 0, null));
            Assert.AreEqual(1, messageList.CountRows);
            messageList.Clear();
            Assert.AreEqual(0, messageList.CountRows);
        }