Example #1
0
        public void Count_DecreasesByOne_WhenElementIsRemoved()
        {
            _empty.Add(1);
            _empty.Remove(1);

            Assert.AreEqual(0, _empty.Count);
        }
Example #2
0
        public void Remove_ReordersHeap_ForUnbalancedRight()
        {
            var unb = new MeanHeap <int>(new[] { 100, 50, 90, 41, 42, 81, 82 }, Comparer <int> .Default, Avg);

            unb.Remove(41);

            TestHelper.AssertSequence(unb, 100, 90, 82, 81, 50, 42);
        }