public void CopyToArgumentNullException()
        {
            var intervalDictionary = new IntervalDictionary <int, string>();

            var intervalValuePair1 = new IntervalValuePair <int, string>(new Interval <int>(5, 10), "5 - 10");
            var intervalValuePair2 = new IntervalValuePair <int, string>(new Interval <int>(15, 20), "15 - 20");
            var intervalValuePair3 = new IntervalValuePair <int, string>(new Interval <int>(25, 25), "25 - 25");

            intervalDictionary.Add(intervalValuePair1);
            intervalDictionary.Add(intervalValuePair2);
            intervalDictionary.Add(intervalValuePair3);

            // ReSharper disable once AssignNullToNotNullAttribute
            intervalDictionary.CopyTo(null, 0);
        }
        public void CopyToArgumentOutOfRangeException()
        {
            var intervalDictionary = new IntervalDictionary <int, string>();

            var intervalValuePair1 = new IntervalValuePair <int, string>(new Interval <int>(5, 10), "5 - 10");
            var intervalValuePair2 = new IntervalValuePair <int, string>(new Interval <int>(15, 20), "15 - 20");
            var intervalValuePair3 = new IntervalValuePair <int, string>(new Interval <int>(25, 25), "25 - 25");

            intervalDictionary.Add(intervalValuePair1);
            intervalDictionary.Add(intervalValuePair2);
            intervalDictionary.Add(intervalValuePair3);

            var a = new IntervalValuePair <int, string> [5];

            intervalDictionary.CopyTo(a, -1);
        }
        public void CopyTo()
        {
            var intervalDictionary = new IntervalDictionary <int, string>();

            var intervalValuePair1 = new IntervalValuePair <int, string>(new Interval <int>(5, 10), "5 - 10");
            var intervalValuePair2 = new IntervalValuePair <int, string>(new Interval <int>(15, 20), "15 - 20");
            var intervalValuePair3 = new IntervalValuePair <int, string>(new Interval <int>(25, 25), "25 - 25");

            intervalDictionary.Add(intervalValuePair1);
            intervalDictionary.Add(intervalValuePair2);
            intervalDictionary.Add(intervalValuePair3);

            var a = new IntervalValuePair <int, string> [5];

            intervalDictionary.CopyTo(a, 0);

            Assert.AreEqual(intervalValuePair1, a[0]);
            Assert.AreEqual(intervalValuePair2, a[1]);
            Assert.AreEqual(intervalValuePair3, a[2]);
        }
        public void CopyToArgumentOutOfRangeException()
        {
            var intervalDictionary = new IntervalDictionary<int, string>();

            var intervalValuePair1 = new IntervalValuePair<int, string>(new Interval<int>(5, 10), "5 - 10");
            var intervalValuePair2 = new IntervalValuePair<int, string>(new Interval<int>(15, 20), "15 - 20");
            var intervalValuePair3 = new IntervalValuePair<int, string>(new Interval<int>(25, 25), "25 - 25");

            intervalDictionary.Add(intervalValuePair1);
            intervalDictionary.Add(intervalValuePair2);
            intervalDictionary.Add(intervalValuePair3);

            var a = new IntervalValuePair<int, string>[5];

            intervalDictionary.CopyTo(a, -1);
        }
        public void CopyToArgumentNullException()
        {
            var intervalDictionary = new IntervalDictionary<int, string>();

            var intervalValuePair1 = new IntervalValuePair<int, string>(new Interval<int>(5, 10), "5 - 10");
            var intervalValuePair2 = new IntervalValuePair<int, string>(new Interval<int>(15, 20), "15 - 20");
            var intervalValuePair3 = new IntervalValuePair<int, string>(new Interval<int>(25, 25), "25 - 25");

            intervalDictionary.Add(intervalValuePair1);
            intervalDictionary.Add(intervalValuePair2);
            intervalDictionary.Add(intervalValuePair3);

            // ReSharper disable once AssignNullToNotNullAttribute
            intervalDictionary.CopyTo(null, 0);
        }
        public void CopyTo()
        {
            var intervalDictionary = new IntervalDictionary<int, string>();

            var intervalValuePair1 = new IntervalValuePair<int, string>(new Interval<int>(5, 10), "5 - 10");
            var intervalValuePair2 = new IntervalValuePair<int, string>(new Interval<int>(15, 20), "15 - 20");
            var intervalValuePair3 = new IntervalValuePair<int, string>(new Interval<int>(25, 25), "25 - 25");

            intervalDictionary.Add(intervalValuePair1);
            intervalDictionary.Add(intervalValuePair2);
            intervalDictionary.Add(intervalValuePair3);

            var a = new IntervalValuePair<int, string>[5];

            intervalDictionary.CopyTo(a, 0);

            Assert.AreEqual(intervalValuePair1, a[0]);
            Assert.AreEqual(intervalValuePair2, a[1]);
            Assert.AreEqual(intervalValuePair3, a[2]);
        }