Exemplo n.º 1
0
        public void TestMultiValueSortedMapExceptions()
        {
            var mvMap = new MultiValueTreeMap <int, Bill>();

            Assert.Throws(typeof(InvalidOperationException), () => mvMap.Max);
            Assert.Throws(typeof(InvalidOperationException), () => mvMap.Min);
            Assert.Throws(typeof(InvalidOperationException), () => mvMap.RemoveMin());
            Assert.Throws(typeof(InvalidOperationException), () => mvMap.RemoveMax());
        }
Exemplo n.º 2
0
        public void TestMultiValueTreeMapRemoveMax()
        {
            var mvMap = new MultiValueTreeMap <int, Bill>();

            Fill(mvMap, 1000, 20, x => x, valueGen);
            mvMap.RemoveMax();
            Assert.Equal(999, mvMap.KeyCount);
            Assert.Equal(999, mvMap.Keys.Count);
            Assert.Equal(998, mvMap.Max);
            Assert.Equal(999 * 20, mvMap.Count);
        }