Skip to content

Commit

Permalink
style: rename InvalidCourseTimeException
Browse files Browse the repository at this point in the history
  • Loading branch information
DWL21 committed Jan 29, 2025
1 parent 8415437 commit 304576f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.yourssu.soongpt.domain.courseTime.implement

import com.yourssu.soongpt.domain.courseTime.implement.exception.InvalidCourseTime
import com.yourssu.soongpt.domain.courseTime.implement.exception.InvalidCourseTimeException

class CourseTime(
val id: Long? = null,
Expand All @@ -12,7 +12,7 @@ class CourseTime(
) {
init {
if (startTime.isOverThan(endTime)) {
throw InvalidCourseTime()
throw InvalidCourseTimeException()
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.yourssu.soongpt.domain.courseTime.implement.exception

import com.yourssu.soongpt.common.handler.BadRequestException

class InvalidCourseTimeException : BadRequestException(message = "강의 시작 시간이 강의 종료 시간보다 늦습니다.") {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.yourssu.soongpt.domain.courseTime.implement

import com.yourssu.soongpt.domain.courseTime.implement.exception.InvalidCourseTime
import com.yourssu.soongpt.domain.courseTime.implement.exception.InvalidCourseTimeException
import org.junit.jupiter.api.*
import kotlin.test.Test

Expand All @@ -14,7 +14,7 @@ class CourseTimeTest {
@Test
@DisplayName("InvalidCourseTime 예외를 반환한다.")
fun failure() {
assertThrows<InvalidCourseTime> {
assertThrows<InvalidCourseTimeException> {
CourseTime(
week = Week.MONDAY,
startTime = Time(1000),
Expand Down

0 comments on commit 304576f

Please sign in to comment.