Add testcase to Automorphic Number Algorithm (#3166)

This commit is contained in:
Ankush263 2022-06-27 11:04:42 +05:30 committed by GitHub
parent 0d97d0bc8e
commit c750283a1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}
}