Add test for Armstrong (#3104)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
This commit is contained in:
parent
9b4ac70403
commit
77e481336e
15
src/test/java/com/thealgorithms/maths/TestArmstrong.java
Normal file
15
src/test/java/com/thealgorithms/maths/TestArmstrong.java
Normal file
@ -0,0 +1,15 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestArmstrong {
|
||||
|
||||
@Test
|
||||
public void testArmstrong() {
|
||||
Armstrong armstrong = new Armstrong();
|
||||
assertThat(armstrong.isArmstrong(371)).isTrue();
|
||||
assertThat(armstrong.isArmstrong(200)).isFalse();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user