Exemplo n.º 1
0
        public void RotateTest_EvenLength()
        {
            var input = new int[6, 6] {
                { 1, 2, 3, 4, 5, 6 },
                { 1, 2, 3, 4, 5, 6 },
                { 1, 2, 3, 4, 5, 6 },
                { 1, 2, 3, 4, 5, 6 },
                { 1, 2, 3, 4, 5, 6 },
                { 1, 2, 3, 4, 5, 6 }
            };

            var solution = new _048_RotateImage();

            solution.Rotate(input);

            AssertHelper.AssertArray(
                new int[6, 6] {
                { 1, 1, 1, 1, 1, 1 },
                { 2, 2, 2, 2, 2, 2 },
                { 3, 3, 3, 3, 3, 3 },
                { 4, 4, 4, 4, 4, 4 },
                { 5, 5, 5, 5, 5, 5 },
                { 6, 6, 6, 6, 6, 6 },
            }, input);
        }
Exemplo n.º 2
0
        public void RotateTest_Empty()
        {
            var input = new int[0, 0] {
            };

            var solution = new _048_RotateImage();

            solution.Rotate(input);

            AssertHelper.AssertArray(new int[0, 0] {
            }, input);
        }
Exemplo n.º 3
0
        public void RotateTest_OneItem()
        {
            var input = new int[1, 1] {
                { 1 }
            };

            var solution = new _048_RotateImage();

            solution.Rotate(input);

            AssertHelper.AssertArray(new int[1, 1] {
                { 1 }
            }, input);
        }