Add tests for Amicable Numbers (#3168)

This commit is contained in:
Ankush263 2022-06-29 00:06:06 +05:30 committed by GitHub
parent bf3ad33d34
commit 2a23770873
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 AmicableNumberTest {
@Test
void testAmicableNumber() {
assertThat(AmicableNumber.isAmicableNumber(220, 284)).isTrue();
assertThat(AmicableNumber.isAmicableNumber(1184, 1210)).isTrue();
assertThat(AmicableNumber.isAmicableNumber(2620, 2924)).isTrue();
}
}