Esempio n. 1
0
        public void FindMatchingPairs1CharCountMapsCompleteTestsTest3LongList2()
        {
            // Initialize lists.
            var list1 = new List <int> {
                1, 2, 4, 7, 8, 3
            };
            var list2 = new List <int> {
                3, 4, 6, 4, 3, 18, 30, 50, 51, 52, 53
            };

            // Initialize expected.
            var expected = new List <int> {
                4, 3
            };

            // Call method.
            var actual = FindMatchingPairs1CharCountMapsComplete.FindMatchingPairs(list1, list2);

            // Since order is not necessarily consistent.
            expected.Sort();
            actual.Sort();

            // Do tests.
            CollectionAssert.AreEqual(expected, actual);
        }
Esempio n. 2
0
 public void FindMatchingPairs1CharCountMapsCompleteTestsTest10NullList2()
 {
     try
     {
         FindMatchingPairs1CharCountMapsComplete.FindMatchingPairs(new List <int> {
             1, 2, 4, 7, 8, 3
         }, null);
     }
     catch (ArgumentException)
     {
         Assert.IsTrue(true);
         return;
     }
     Assert.Fail();
 }
Esempio n. 3
0
        public void FindMatchingPairs1CharCountMapsCompleteTestsTest6EmptyLists()
        {
            // Initialize lists.
            var list1 = new List <int>();
            var list2 = new List <int>();

            // Initialize expected.
            var expected = new List <int>();

            // Call method.
            var actual = FindMatchingPairs1CharCountMapsComplete.FindMatchingPairs(list1, list2);

            // Since order is not necessarily consistent.
            expected.Sort();
            actual.Sort();

            // Do tests.
            CollectionAssert.AreEqual(expected, actual);
        }