Skip to content

Commit 77e4813

Browse files
huyhq38siriak
andauthored
Add test for Armstrong (TheAlgorithms#3104)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
1 parent 9b4ac70 commit 77e4813

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 TestArmstrong {
8+
9+
@Test
10+
public void testArmstrong() {
11+
Armstrong armstrong = new Armstrong();
12+
assertThat(armstrong.isArmstrong(371)).isTrue();
13+
assertThat(armstrong.isArmstrong(200)).isFalse();
14+
}
15+
}

0 commit comments

Comments
 (0)