From c750283a1c4a4a39856517114153876cafd303d9 Mon Sep 17 00:00:00 2001 From: Ankush263 <86042508+Ankush263@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:04:42 +0530 Subject: [PATCH] Add testcase to Automorphic Number Algorithm (#3166) --- .../maths/AutomorphicNumberTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/java/com/thealgorithms/maths/AutomorphicNumberTest.java diff --git a/src/test/java/com/thealgorithms/maths/AutomorphicNumberTest.java b/src/test/java/com/thealgorithms/maths/AutomorphicNumberTest.java new file mode 100644 index 00000000..fa849bc2 --- /dev/null +++ b/src/test/java/com/thealgorithms/maths/AutomorphicNumberTest.java @@ -0,0 +1,16 @@ +package com.thealgorithms.maths; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class AutomorphicNumberTest{ + + @Test + void testAutomorphicNumber(){ + assertThat(AutomorphicNumber.isAutomorphic(625)).isTrue(); + assertThat(AutomorphicNumber.isAutomorphic(144)).isFalse(); + assertThat(AutomorphicNumber.isAutomorphic(9376)).isTrue(); + assertThat(AutomorphicNumber.isAutomorphic(169)).isFalse(); + } +}