Add testcase to Automorphic Number Algorithm (#3166)
This commit is contained in:
parent
0d97d0bc8e
commit
c750283a1c
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user