예제 #1
0
        public void InsertItemsAtInvalidIndex()
        {
            var list = new ListHistory <string>
            {
                "a",
                "b",
                "c",
                "d",
                "e",
                "f",
            };

            Assert.Throws <ArgumentOutOfRangeException>(() => list.Insert(-1, "aa"));
            Assert.Throws <ArgumentOutOfRangeException>(() => list.Insert(list.Count + 1, "bb"));
        }