示例#1
0
        public static void MergeEqualItemsTest()
        {
            var charArray1 = new[] { 'a', 'b', 'c' };
            var charArray2 = new[] { '1', '2', '3' };

            var expectedMergedArray = new[] { 'a', '1', 'b', '2', 'c', '3' };
            var actualMergedArray   = MergeArray.Merge(charArray1, charArray2);

            for (var i = 0; i < expectedMergedArray.Length; i++)
            {
                Assert.AreEqual(expectedMergedArray[i], actualMergedArray[i]);
            }
        }
示例#2
0
        public static void MergeLargeUnequalItemsTest()
        {
            var charArray1 = new[] { 'f', '5', 'c', 'q', '9', '-', 't', '1' };
            var charArray2 = new[] { '4', '2', '3' };

            var expectedMergedArray = new[]
            { 'f', '4', '5', '2', 'c', '3', 'q', '9', '-', 't', '1' };

            var actualMergedArray = MergeArray.Merge(charArray1, charArray2);

            for (var i = 0; i < expectedMergedArray.Length; i++)
            {
                Assert.AreEqual(expectedMergedArray[i], actualMergedArray[i]);
            }
        }