예제 #1
0
        public void Test2()
        {
            var c = new ConvertArrayToZigZag();

            var arr = new int[] { 4, 3, 7, 8, 6, 2, 1 };
            var exp = new int[] { 3, 7, 4, 8, 2, 6, 1 };

            c.Convert(arr);

            Assert.That(arr.SequenceEqual(exp), Is.True);
        }
예제 #2
0
        public void Test()
        {
            var c = new ConvertArrayToZigZag();

            var arr = new int[] { 1, 4, 3, 2 };
            var exp = new int[] { 1, 4, 2, 3 };

            c.Convert(arr);

            Assert.That(arr.SequenceEqual(exp), Is.True);
        }