public void IgnoresUpdatesWhenTheKeyDoesNotExist()
            {
                intCollection.InsertItem(1);

                intCollection.UpdateItem(2, 3);
                var indexOfItemThree = intCollection.IndexOf(3);

                indexOfItemThree.Should().BeNull();
            }
            public void InsertsElementInCorrectOrder()
            {
                List <int> list = new List <int> {
                    40, 70, 8, 3, 1, 2
                };

                intCollection.ReplaceWith(list);

                intCollection.InsertItem(4);

                List <List <int> > expected = new List <List <int> >
                {
                    new List <int> {
                        1, 2, 3, 4, 8
                    },
                    new List <int> {
                        40, 70
                    }
                };

                CollectionAssert.AreEqual(intCollection, expected);
            }
            public void InsertsElementInCorrectOrderWhenDescending()
            {
                List <int> list = new List <int> {
                    40, 70, 8, 3, 1, 2
                };
                var collection = new GroupedOrderedCollection <int>(i => i, i => i, i => i.ToString().Length, true);

                collection.ReplaceWith(list);

                collection.InsertItem(4);

                List <List <int> > expected = new List <List <int> >
                {
                    new List <int> {
                        70, 40
                    },
                    new List <int> {
                        8, 4, 3, 2, 1
                    },
                };

                CollectionAssert.AreEqual(collection, expected);
            }