public void Generic_Constructor_IDictionary(int count)
        {
            var source = GenericIDictionaryFactory(count);
            IDictionary <TKey, TValue> copied = new OptimizedBTree <TKey, TValue>(source);

            Assert.Equal(source.Count, copied.Count);
        }
        public void Generic_Constructor_IComparer(int count)
        {
            var comparer = GetKeyIComparer();
            var source   = GenericIDictionaryFactory(count);
            var copied   = new OptimizedBTree <TKey, TValue>(source, comparer);

            Assert.Equal(source, copied);
        }
        public void Dictionary_Generic_KeyCollection_GetEnumerator(int count)
        {
            var dictionary = new OptimizedBTree <string, string>();
            var seed       = 13453;

            while (dictionary.Count < count)
            {
                dictionary.Add(CreateT(seed++), CreateT(seed++));
            }
            dictionary.Keys.GetEnumerator();
        }
        protected override ICollection <string> GenericICollectionFactory(int count)
        {
            var list = new OptimizedBTree <string, string>();
            var seed = 13453;

            for (var i = 0; i < count; i++)
            {
                list.Add(CreateT(seed++), CreateT(seed++));
            }
            return(list.Keys);
        }