From 1c9d64c135f8b936a4ee959ca3c7a86d5589a121 Mon Sep 17 00:00:00 2001 From: Jieun Date: Mon, 28 Oct 2024 23:14:07 +0900 Subject: [PATCH] =?UTF-8?q?del(RoundInputTest.kt):=20RoundInputTest=20?= =?UTF-8?q?=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/kotlin/racingcar/RoundInputTest.kt | 54 --------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/test/kotlin/racingcar/RoundInputTest.kt diff --git a/src/test/kotlin/racingcar/RoundInputTest.kt b/src/test/kotlin/racingcar/RoundInputTest.kt deleted file mode 100644 index 254fd8da..00000000 --- a/src/test/kotlin/racingcar/RoundInputTest.kt +++ /dev/null @@ -1,54 +0,0 @@ -package racingcar - -import org.junit.jupiter.api.Assertions.assertThrows -import org.junit.jupiter.api.DisplayName -import org.junit.jupiter.api.Test -import racingcar.view.InputView - -class RoundInputTest { - private val inputView = InputView() - - @Test - @DisplayName("음수 입력 시 예외 발생") - fun parseRounds_ThrowsException_WhenInputIsNegative() { - val input = "-1" - assertThrows(IllegalArgumentException::class.java) { - inputView.parseRounds(input) - } - } - - @Test - @DisplayName("0 입력 시 예외 발생") - fun parseRounds_ThrowsException_WhenInputIsZero() { - val input = "0" - assertThrows(IllegalArgumentException::class.java) { - inputView.parseRounds(input) - } - } - - @Test - @DisplayName("문자열 입력 시 예외 발생") - fun parseRounds_ThrowsException_WhenInputIsString() { - val input = "invalid" - assertThrows(IllegalArgumentException::class.java) { - inputView.parseRounds(input) - } - } - - @Test - @DisplayName("정수 범위를 초과한 값 입력 시 예외 발생") - fun parseRounds_ThrowsException_WhenInputExceedsIntRange() { - val input = "${Int.MAX_VALUE + 1L}" - assertThrows(IllegalArgumentException::class.java) { - inputView.parseRounds(input) - } - } - - @Test - @DisplayName("유효한 시도 횟수 입력 시 정상 처리") - fun parseRounds_ReturnsCorrectValue_WhenInputIsValid() { - val input = "3" - val rounds = inputView.parseRounds(input) - assert(rounds == 3) - } -} \ No newline at end of file