Skip to content

Commit

Permalink
refactor: 테스트에서 서식 지정자 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
zbqmgldjfh committed Jan 21, 2024
1 parent d8df25b commit d28dd2e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CategoryNameTest {
@DisplayName("name을 String으로 받아 해당 CategoryName enum으로 변환한다")
@CsvSource({"bachelor,BACHELOR", "industry_university,INDUSTRY_UNIVERSITY", "library,LIBRARY"})
@ParameterizedTest
public void fromStringName(String name, CategoryName categoryName) {
void fromStringName(String name, CategoryName categoryName) {
// when
CategoryName result = CategoryName.fromStringName(name);

Expand All @@ -25,7 +25,7 @@ public void fromStringName(String name, CategoryName categoryName) {

@DisplayName("존재하지 않는 String name으로 CategoryName을 찾으려 하는 경우 예외가 발생한다")
@Test
public void fromStringNameException() {
void fromStringNameException() {
// given
String name = "invalidName";

Expand All @@ -40,7 +40,7 @@ public void fromStringNameException() {
@DisplayName("String name을 통해 동일한 CategoryName enum인지 확인한다")
@CsvSource({"bachelor,true", "invalid,false"})
@ParameterizedTest
public void isSameName(String name, boolean expected) {
void isSameName(String name, boolean expected) {
// when
boolean result = CategoryName.BACHELOR.isSameName(name);

Expand All @@ -51,7 +51,7 @@ public void isSameName(String name, boolean expected) {
@DisplayName("String shortName을 통해 동일한 CategoryName enum인지 확인한다")
@CsvSource({"bch,true", "invalid,false"})
@ParameterizedTest
public void isSameShortName(String name, boolean expected) {
void isSameShortName(String name, boolean expected) {
// when
boolean result = CategoryName.BACHELOR.isSameShortName(name);

Expand All @@ -62,7 +62,7 @@ public void isSameShortName(String name, boolean expected) {
@DisplayName("String korName을 통해 동일한 CategoryName enum인지 확인한다")
@CsvSource({"학사,true", "invalid,false"})
@ParameterizedTest
public void isSameKorName(String name, boolean expected) {
void isSameKorName(String name, boolean expected) {
// when
boolean result = CategoryName.BACHELOR.isSameKorName(name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DepartmentNameTest {
@DisplayName("name을 String으로 받아 해당 DepartmentName enum으로 변환한다")
@CsvSource({"korean,KOREAN", "civil_environment,CIVIL_ENV", "business_administration,BUIS_ADMIN"})
@ParameterizedTest
public void fromName(String name, DepartmentName departmentName) {
void fromName(String name, DepartmentName departmentName) {
// when
DepartmentName result = DepartmentName.fromName(name);

Expand All @@ -26,7 +26,7 @@ public void fromName(String name, DepartmentName departmentName) {
@DisplayName("hostPrefix를 String으로 받아 해당 DepartmentName enum으로 변환한다")
@CsvSource({"korea,KOREAN", "cee,CIVIL_ENV", "biz,BUIS_ADMIN"})
@ParameterizedTest
public void fromHostPrefix(String name, DepartmentName departmentName) {
void fromHostPrefix(String name, DepartmentName departmentName) {
// when
DepartmentName result = DepartmentName.fromHostPrefix(name);

Expand All @@ -37,7 +37,7 @@ public void fromHostPrefix(String name, DepartmentName departmentName) {
@DisplayName("korName를 String으로 받아 해당 DepartmentName enum으로 변환한다")
@CsvSource({"국어국문학과,KOREAN", "사회환경공학부,CIVIL_ENV", "경영학과,BUIS_ADMIN"})
@ParameterizedTest
public void fromKor(String name, DepartmentName departmentName) {
void fromKor(String name, DepartmentName departmentName) {
// when
DepartmentName result = DepartmentName.fromKor(name);

Expand All @@ -47,7 +47,7 @@ public void fromKor(String name, DepartmentName departmentName) {

@DisplayName("존재하지 않는 String name으로 DepartmentName을 찾으려 하는 경우 예외가 발생한다")
@Test
public void fromNameException() {
void fromNameException() {
// given
String name = "invalidName";

Expand All @@ -61,7 +61,7 @@ public void fromNameException() {

@DisplayName("존재하지 않는 String fromHostPrefix로 DepartmentName을 찾으려 하는 경우 예외가 발생한다")
@Test
public void fromHostPrefixException() {
void fromHostPrefixException() {
// given
String name = "invalidName";

Expand All @@ -75,7 +75,7 @@ public void fromHostPrefixException() {

@DisplayName("존재하지 않는 String fromKor로 DepartmentName을 찾으려 하는 경우 예외가 발생한다")
@Test
public void fromKorException() {
void fromKorException() {
// given
String name = "invalidName";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void member_invalid_email_id(String url) {

@DisplayName("동등성 검증 테스트")
@Test
public void notice_equals_test() {
void notice_equals_test() {
DepartmentNotice notice1 = createDepartmentNotice(1L, "https://www.one.com");
DepartmentNotice notice2 = createDepartmentNotice(1L, "https://www.two.com");
Assertions.assertThat(notice1.equals(notice2)).isTrue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void setUp() {

@DisplayName("이미 저장되있는 일반 공지의 경우 중복 저장하지 않도록 걸러낸다")
@Test
public void filteringSoonSaveNotices() {
void filteringSoonSaveNotices() {
// given
List<CommonNoticeFormatDto> originNotices = new ArrayList<>();

Expand Down Expand Up @@ -53,7 +53,7 @@ public void filteringSoonSaveNotices() {

@DisplayName("이미 저장되있는 학과별 공지의 경우 중복 저장하지 않도록 걸러낸다")
@Test
public void filteringSoonSaveDepartmentNotices() {
void filteringSoonSaveDepartmentNotices() {
// given
List<CommonNoticeFormatDto> originNotices = new ArrayList<>();

Expand Down Expand Up @@ -82,7 +82,7 @@ public void filteringSoonSaveDepartmentNotices() {

@DisplayName("삭제되어야 할 공지의 article id를 걸러낸다")
@Test
public void filteringSoonDeleteNoticeIds() {
void filteringSoonDeleteNoticeIds() {
// given
List<String> savedArticleIds = List.of("5b54bcd", "5b54bce", "5b54bcf", "5b54bcg");
List<String> latestNoticeIds = List.of("5b54bcd", "5b54bce", "5b54bcg");
Expand All @@ -97,7 +97,7 @@ public void filteringSoonDeleteNoticeIds() {

@DisplayName("삭제되어야 할 학과별 공지의 article id를 걸러낸다")
@Test
public void filteringSoonDeleteDepartmentNoticeIds() {
void filteringSoonDeleteDepartmentNoticeIds() {
// given
List<Integer> savedArticleIds = List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
List<Integer> latestNoticeIds = List.of(1, 4, 5, 6, 8, 10);
Expand All @@ -112,7 +112,7 @@ public void filteringSoonDeleteDepartmentNoticeIds() {

@DisplayName("새롭게 scrap된 공지들 결과물로부터 id를 추출한다")
@Test
public void extractNoticeIds() {
void extractNoticeIds() {
// given
List<CommonNoticeFormatDto> originNotices = new ArrayList<>();

Expand All @@ -139,7 +139,7 @@ public void extractNoticeIds() {

@DisplayName("새롭게 scrap된 학과별 공지들 결과물로부터 id를 추출한다")
@Test
public void extractDepartmentNoticeIds() {
void extractDepartmentNoticeIds() {
// given
List<CommonNoticeFormatDto> originNotices = new ArrayList<>();

Expand Down

0 comments on commit d28dd2e

Please sign in to comment.