@@ -8,47 +8,47 @@ public class ArrayRotationTest {
88
99 @ Test
1010 void shouldRotateArrayRightByTwoPositions () {
11- int [] values = { 1 , 2 , 3 , 4 , 5 };
11+ int [] values = {1 , 2 , 3 , 4 , 5 };
1212
1313 ArrayRotation .rotateRight (values , 2 );
1414
15- assertArrayEquals (new int [] { 4 , 5 , 1 , 2 , 3 }, values );
15+ assertArrayEquals (new int [] {4 , 5 , 1 , 2 , 3 }, values );
1616 }
1717
1818 @ Test
1919 void shouldRotateArrayLeftByTwoPositions () {
20- int [] values = { 1 , 2 , 3 , 4 , 5 };
20+ int [] values = {1 , 2 , 3 , 4 , 5 };
2121
2222 ArrayRotation .rotateLeft (values , 2 );
2323
24- assertArrayEquals (new int [] { 3 , 4 , 5 , 1 , 2 }, values );
24+ assertArrayEquals (new int [] {3 , 4 , 5 , 1 , 2 }, values );
2525 }
2626
2727 @ Test
2828 void shouldHandleRotationGreaterThanArrayLength () {
29- int [] values = { 10 , 20 , 30 , 40 };
29+ int [] values = {10 , 20 , 30 , 40 };
3030
3131 ArrayRotation .rotateRight (values , 6 );
3232
33- assertArrayEquals (new int [] { 30 , 40 , 10 , 20 }, values );
33+ assertArrayEquals (new int [] {30 , 40 , 10 , 20 }, values );
3434 }
3535
3636 @ Test
3737 void shouldHandleLeftRotationGreaterThanArrayLength () {
38- int [] values = { 10 , 20 , 30 , 40 };
38+ int [] values = {10 , 20 , 30 , 40 };
3939
4040 ArrayRotation .rotateLeft (values , 6 );
4141
42- assertArrayEquals (new int [] { 30 , 40 , 10 , 20 }, values );
42+ assertArrayEquals (new int [] {30 , 40 , 10 , 20 }, values );
4343 }
4444
4545 @ Test
4646 void shouldKeepSingleElementArrayUnchanged () {
47- int [] values = { 99 };
47+ int [] values = {99 };
4848
4949 ArrayRotation .rotateLeft (values , 5 );
5050
51- assertArrayEquals (new int [] { 99 }, values );
51+ assertArrayEquals (new int [] {99 }, values );
5252 }
5353
5454 @ Test
@@ -62,19 +62,19 @@ void shouldHandleEmptyArrayWithoutErrors() {
6262
6363 @ Test
6464 void shouldReturnOriginalArrayWhenRotationIsZero () {
65- int [] values = { 7 , 8 , 9 };
65+ int [] values = {7 , 8 , 9 };
6666
6767 ArrayRotation .rotateLeft (values , 0 );
6868
69- assertArrayEquals (new int [] { 7 , 8 , 9 }, values );
69+ assertArrayEquals (new int [] {7 , 8 , 9 }, values );
7070 }
7171
7272 @ Test
7373 void shouldHandleNegativeRotation () {
74- int [] values = { 1 , 2 , 3 , 4 , 5 };
74+ int [] values = {1 , 2 , 3 , 4 , 5 };
7575
7676 ArrayRotation .rotateRight (values , -2 );
7777
78- assertArrayEquals (new int [] { 4 , 3 , 5 , 1 , 2 }, values );
78+ assertArrayEquals (new int [] {4 , 3 , 5 , 1 , 2 }, values );
7979 }
8080}
0 commit comments