Exemple #1
0
        public void TimeTest()
        {
            int[] numbers = CreateNumbers(200);
            var   finder  = new DistinctPairsFinder(numbers);

            DateTime start = DateTime.Now;

            finder.Find();

            DateTime end = DateTime.Now;

            var      expected = new TimeSpan(0, 0, 1);
            TimeSpan actual   = end - start;

            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
        public void Setup()
        {
            m_Numbers = new[] { 1, 2, 3, 4, 2 };

            m_Finder = new DistinctPairsFinder(m_Numbers);
        }