From 9a09a9e772dd39a05f247111d83fedceaf31ac10 Mon Sep 17 00:00:00 2001 From: Harshal <37841724+harshalkh@users.noreply.github.com> Date: Wed, 26 Oct 2022 07:14:37 +0530 Subject: [PATCH] Add test case for Rotation (#3667) --- .../com/thealgorithms/strings/RotationTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/java/com/thealgorithms/strings/RotationTest.java diff --git a/src/test/java/com/thealgorithms/strings/RotationTest.java b/src/test/java/com/thealgorithms/strings/RotationTest.java new file mode 100644 index 000000000..781a68d8c --- /dev/null +++ b/src/test/java/com/thealgorithms/strings/RotationTest.java @@ -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)); + } +}