Skip to content

Commit

Permalink
Merge pull request #1626 from woowacourse/hotfix/#no-issue
Browse files Browse the repository at this point in the history
fix: error message
  • Loading branch information
wonyongChoi05 authored Nov 23, 2023
2 parents ca36ca2 + 4575ec7 commit ef81539
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static Part getPartByName(String name) {
return Arrays.stream(values())
.filter(part -> part.name.equals(name))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException());
.orElseThrow(() -> new IllegalArgumentException("name과 일치하는 part가 존재하지 않습니다."));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class DepartmentTest {

@Test
void getPartType_이름이_포함하는_그룹명이_없으면_예외가_발생한다() {

assertThatThrownBy(() -> new Department(null, "테스트", "test"))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("name과 일치하는 part가 존재하지 않습니다.");
Expand Down

0 comments on commit ef81539

Please sign in to comment.