diff --git a/JavaDsaWithTest/src/test/java/org/practice/dsa/leet_code/ReverseIntegerTest.java b/JavaDsaWithTest/src/test/java/org/practice/dsa/leet_code/ReverseIntegerTest.java new file mode 100644 index 00000000..eaa4a7e5 --- /dev/null +++ b/JavaDsaWithTest/src/test/java/org/practice/dsa/leet_code/ReverseIntegerTest.java @@ -0,0 +1,17 @@ +package org.practice.dsa.leet_code; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class ReverseIntegerTest { + private final QuestionReverseInteger reverseInteger = new QuestionReverseInteger(); + + @Test + public void testReverseInteger() { + int input = 123; + int expected = 321; + int actual = reverseInteger.reverse(input); + assertEquals(expected, actual); + } +}