mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 14:34:05 +08:00
Add testcase to Automorphic Number Algorithm (#3166)
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user