-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathResultTest.java
More file actions
33 lines (25 loc) · 814 Bytes
/
ResultTest.java
File metadata and controls
33 lines (25 loc) · 814 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
29
30
31
32
33
package hackrank.algorithm.implement.utopian;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
public class ResultTest {
@Test
public void utopianTree_ZeroCycles_InitialHeightOne() {
int height = Result.utopianTree(0);
assertThat(height).isEqualTo(1);
}
@Test
public void utopianTree_OneCycle_HeightDouble() {
int height = Result.utopianTree(1);
assertThat(height).isEqualTo(2);
}
@Test
public void utopianTree_TwoCycles_HeightDoublePlusOne() {
int height = Result.utopianTree(2);
assertThat(height).isEqualTo(3);
}
@Test
public void utopianTree_FiveCycles_HeightFourteen() {
int height = Result.utopianTree(5);
assertThat(height).isEqualTo(14);
}
}