Add tests for Amicable Numbers (#3168)
This commit is contained in:
parent
bf3ad33d34
commit
2a23770873
@ -0,0 +1,15 @@
|
|||||||
|
package com.thealgorithms.maths;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
public class AmicableNumberTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testAmicableNumber() {
|
||||||
|
assertThat(AmicableNumber.isAmicableNumber(220, 284)).isTrue();
|
||||||
|
assertThat(AmicableNumber.isAmicableNumber(1184, 1210)).isTrue();
|
||||||
|
assertThat(AmicableNumber.isAmicableNumber(2620, 2924)).isTrue();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user