Skip to content

Commit

Permalink
지하철 등록 techeer-sv#2 docs : README 수정 및 TestCode DisplayName 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
heondong9265 committed May 31, 2024
1 parent 8307c3a commit f29614b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<img src="image/domain.png" width="500">

### 지하철 역 관련 기능
- 지하철 역을 등록하고 삭제할 수 있다. (단, 노선에 등록된 역은 삭제할 수 없다)
- 중복된 지하철 역 이름이 등록될 수 없다.
- 지하철 역 이름은 2글자 이상이어야 한다.
- 지하철 역을 등록하고 삭제할 수 있다. (단, 노선에 등록된 역은 삭제할 수 없다) -> O
- 중복된 지하철 역 이름이 등록될 수 없다. -> O
- 지하철 역 이름은 2글자 이상이어야 한다. -> O
- 지하철 역의 목록을 조회할 수 있다.

### 지하철 노선 관련 기능
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/subway/SubwayServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ void setUp() {
}

@Nested
@DisplayName("역 등록 테스트")
@DisplayName("지하철 역 관련 기능")
class AddStationTest {

@Test
@DisplayName("새로운 역을 등록")
@DisplayName("지하철 역을 등록하고 삭제할 수 있다.")
void addStation() {
subwayService.addStation("잠실역");
assertTrue(StationRepository.isStationExist("잠실역"));
}

@Test
@DisplayName("중복된 역 검증")
@DisplayName("중복된 지하철 역 이름이 등록될 수 없다.")
void duplicationStation() {
subwayService.addStation("잠실역");
assertThrows(IllegalArgumentException.class, () -> subwayService.addStation("잠실역"));
}

@Test
@DisplayName("역 이름은 2글자 이상이어야 한다.")
@DisplayName("지하철 역 이름은 2글자 이상이어야 한다.")
void invalidStationName() {
assertThrows(IllegalArgumentException.class, () -> subwayService.addStation("짱"));
}
Expand Down

0 comments on commit f29614b

Please sign in to comment.