forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowerSumTest.java
More file actions
28 lines (23 loc) · 712 Bytes
/
PowerSumTest.java
File metadata and controls
28 lines (23 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.thealgorithms.backtracking;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class PowerSumTest {
@Test
void testNumberZeroAndPowerZero() {
PowerSum powerSum = new PowerSum();
int result = powerSum.powSum(0, 0);
assertEquals(1, result);
}
@Test
void testNumberHundredAndPowerTwo() {
PowerSum powerSum = new PowerSum();
int result = powerSum.powSum(100, 2);
assertEquals(3, result);
}
@Test
void testNumberHundredAndPowerThree() {
PowerSum powerSum = new PowerSum();
int result = powerSum.powSum(100, 3);
assertEquals(1, result);
}
}