mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 18:32:56 +08:00
Add test case for Rotation (#3667)
This commit is contained in:
15
src/test/java/com/thealgorithms/strings/RotationTest.java
Normal file
15
src/test/java/com/thealgorithms/strings/RotationTest.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package com.thealgorithms.strings;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
public class RotationTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testRotation() {
|
||||||
|
assertEquals("eksge", Rotation.rotation("geeks", 2));
|
||||||
|
assertEquals("anasban", Rotation.rotation("bananas", 3));
|
||||||
|
assertEquals("abracadabra", Rotation.rotation("abracadabra", 0));
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user