Skip to content

Commit

Permalink
feat: 과목 집합은 비어있는 상태로 생성할 수 없게 하는 기능 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
DWL21 committed Feb 5, 2025
1 parent 0b58afc commit 1c1407a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package com.yourssu.soongpt.domain.course.implement

import com.yourssu.soongpt.domain.course.implement.exception.InvalidCoursesException

class Courses(
val courses: List<Course>,
) {
init {
if (courses.isEmpty()) {
throw InvalidCoursesException()
}
}
fun isEmpty(): Boolean {
return courses.isEmpty()
}
Expand Down

0 comments on commit 1c1407a

Please sign in to comment.