-
Notifications
You must be signed in to change notification settings - Fork 738
Expand file tree
/
Copy pathLadderTest.java
More file actions
28 lines (20 loc) · 837 Bytes
/
LadderTest.java
File metadata and controls
28 lines (20 loc) · 837 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 nextstep.ladder.domain;
import nextstep.ladder.view.ReviewView;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
class LadderTest {
@DisplayName("사다리 생성 테스트")
@Test
public void createLadder() throws Exception {
Ladder ladder = new Ladder(new PersonNames(List.of("1", "2", "3")), 3);
ReviewView.printLadder(ladder);
assertThat(ladder.getPersonNames().getPersonNames())
.containsExactly(new PersonName("1"), new PersonName("2"), new PersonName("3"));
assertThat(ladder.getLadderLines().size())
.isEqualTo(3);
assertThat(ladder.getLadderLines().getLadderLines().get(0).size())
.isEqualTo(2);
}
}