Skip to content

Commit c750283

Browse files
authored
Add testcase to Automorphic Number Algorithm (TheAlgorithms#3166)
1 parent 0d97d0b commit c750283

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.thealgorithms.maths;
2+
3+
import org.junit.jupiter.api.Test;
4+
5+
import static org.assertj.core.api.Assertions.assertThat;
6+
7+
public class AutomorphicNumberTest{
8+
9+
@Test
10+
void testAutomorphicNumber(){
11+
assertThat(AutomorphicNumber.isAutomorphic(625)).isTrue();
12+
assertThat(AutomorphicNumber.isAutomorphic(144)).isFalse();
13+
assertThat(AutomorphicNumber.isAutomorphic(9376)).isTrue();
14+
assertThat(AutomorphicNumber.isAutomorphic(169)).isFalse();
15+
}
16+
}

0 commit comments

Comments
 (0)