Accord.Tests.Math.RedBlackDictionaryTest.EmptyTest C# (CSharp) Method

EmptyTest() private method

private EmptyTest ( ) : void
return void
        public void EmptyTest()
        {
            var map = new RedBlackTreeDictionary<int, string>();

            bool thrown;
            
            thrown = false;
            try { var c = map[1]; }
            catch (KeyNotFoundException) { thrown = true; }
            Assert.IsTrue(thrown);

            thrown = false;
            try { var min = map.Min();}
            catch (InvalidOperationException) { thrown = true; }
            Assert.IsTrue(thrown);

            thrown = false;
            try { var max = map.Max();}
            catch (InvalidOperationException) { thrown = true; }
            Assert.IsTrue(thrown);

            thrown = false;
            try { var next = map.GetNext(0);}
            catch (KeyNotFoundException) { thrown = true; }
            Assert.IsTrue(thrown);

            thrown = false;
            try { var prev = map.GetPrevious(0); }
            catch (KeyNotFoundException) { thrown = true; }
            Assert.IsTrue(thrown);

        }