-
Notifications
You must be signed in to change notification settings - Fork 738
Expand file tree
/
Copy pathLadderExecutorTest.java
More file actions
30 lines (22 loc) · 952 Bytes
/
LadderExecutorTest.java
File metadata and controls
30 lines (22 loc) · 952 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
package nextstep.ladder.domain;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
class LadderExecutorTest {
Participants participants;
@BeforeEach
void setUp() {
participants = new Participants("a,b,c,d");
}
@Test
@DisplayName("사다리를 실행하고 결과를 수집")
void moveAndCollectResult() {
LadderExecutor ladderExecutor = new LadderExecutor(NextStepLinesTest.lines(), participants);
MachingResult machingResult = ladderExecutor.play();
assertThat(machingResult.getMachingResultMap().get(0)).isEqualTo(1);
assertThat(machingResult.getMachingResultMap().get(1)).isEqualTo(0);
assertThat(machingResult.getMachingResultMap().get(2)).isEqualTo(3);
assertThat(machingResult.getMachingResultMap().get(3)).isEqualTo(2);
}
}