Exemplo n.º 1
0
        public void Remove()
        {
            var list = new DList <int> {
                0, 1, 2
            };

            list.Remove(item => item == 1).ShouldBe(1);

            list.ShouldBe(new[] { 0, 2 });

            list.Remove(1);

            list.ShouldBe(new[] { 0 });
        }
Exemplo n.º 2
0
        public void Insert()
        {
            var list = new DList <int> {
                1, 3
            };

            list.Insert(1, 2);

            list.ShouldBe(new[] { 1, 2, 3 });
        }