Exemplo n.º 1
0
        public void UnitRdx_IndexOfValue()
        {
            var rd = new RankedDictionary <int, int>();

            for (int ii = 0; ii < 500; ++ii)
            {
                rd.Add(ii, ii + 1000);
            }

            var ix1 = rd.IndexOfValue(1400);

            Assert.AreEqual(400, ix1);

            var ix2 = rd.IndexOfValue(88888);

            Assert.AreEqual(-1, ix2);
        }