public void AddRange()
        {
            var Random  = Initialise();
            var Records = new BiDictionary <int, int>();

            Records.AddRange(YieldRandom(Random, 1024).Select(ToIntPair));

            Validate(Records);
        }
        public void AddRangeCollide()
        {
            var Random  = Initialise();
            var Records = new BiDictionary <Collider, Collider>();

            Records.AddRange(YieldRandom(Random, 64).Select(ToColliderPair));

            Validate(Records);
        }
        public void AddRangePrePopulatedCollide()
        {
            var Random  = Initialise();
            var Records = new BiDictionary <Collider, Collider>();

            var Input = YieldRandom(Random, 1024).Select(ToColliderPair).ToArray();

            for (var Index = 0; Index < 512; Index++)
            {
                Records.Add(Input[Index]);
            }

            Records.AddRange(Input.Skip(512));

            Validate(Records);
        }
        public void AddRangeDuplicateInRange()
        {
            var Records = new BiDictionary <int, int>(64);

            try
            {
                Records.AddRange(new[] { new KeyValuePair <int, int>(1, 1), new KeyValuePair <int, int>(2, 2), new KeyValuePair <int, int>(3, 3), new KeyValuePair <int, int>(1, 4) });

                Assert.Fail("Range succeeded");
            }
            catch (ArgumentException)
            {
            }

            Assert.AreEqual(0, Records.Count, "Items were added");
        }
        public void AddRangeDuplicateInDictionary()
        {
            var Records = new BiDictionary <int, int>(64);

            Records[9]  = 1;
            Records[10] = 2;
            Records[11] = 3;
            Records[12] = 4;

            try
            {
                Records.AddRange(new[] { new KeyValuePair <int, int>(1, 5), new KeyValuePair <int, int>(2, 6), new KeyValuePair <int, int>(3, 7), new KeyValuePair <int, int>(9, 8) });

                Assert.Fail("Range succeeded");
            }
            catch (ArgumentException)
            {
            }

            Assert.AreEqual(4, Records.Count, "Items were added");
        }