Add test for Armstrong (#3104)

Co-authored-by: Andrii Siriak <siryaka@gmail.com>
This commit is contained in:
de 2022-06-08 22:15:01 +07:00 committed by GitHub
parent 9b4ac70403
commit 77e481336e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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();
}
}