From 8a0d5454352e3d2050bd0ebde084d6e427930390 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Thu, 16 Jul 2026 02:46:58 +0000 Subject: [PATCH] =?UTF-8?q?=EB=B6=84=EC=84=9D=20=EA=B2=B0=EA=B3=BC?= =?UTF-8?q?=EB=A5=BC=20=EA=B8=B0=EB=B0=98=EC=9C=BC=EB=A1=9C=20Spring=20?= =?UTF-8?q?=EC=A0=84=ED=99=98=20=EC=B2=B4=ED=81=AC=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=9E=91=EC=84=B1=20(E2E-MINIMAX-DEV-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/MinimaxServiceTest.java | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/test/java/com/example/e2eminimax/service/MinimaxServiceTest.java diff --git a/src/test/java/com/example/e2eminimax/service/MinimaxServiceTest.java b/src/test/java/com/example/e2eminimax/service/MinimaxServiceTest.java new file mode 100644 index 0000000..31dcdbb --- /dev/null +++ b/src/test/java/com/example/e2eminimax/service/MinimaxServiceTest.java @@ -0,0 +1,47 @@ +package com.example.e2eminimax.service; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class MinimaxServiceTest { + + private MinimaxService minimaxService; + + @BeforeEach + void setUp() { + minimaxService = new MinimaxService(); + } + + @Test + void processRequest_ValidInput_ReturnsProcessedString() { + String result = minimaxService.processRequest("test input"); + assertEquals("Processed: test input", result); + } + + @Test + void processRequest_NullInput_ThrowsException() { + assertThrows(IllegalArgumentException.class, () -> minimaxService.processRequest(null)); + } + + @Test + void processRequest_BlankInput_ThrowsException() { + assertThrows(IllegalArgumentException.class, () -> minimaxService.processRequest(" ")); + } + + @Test + void validateInput_ValidInput_ReturnsTrue() { + assertTrue(minimaxService.validateInput("valid")); + } + + @Test + void validateInput_NullInput_ReturnsFalse() { + assertFalse(minimaxService.validateInput(null)); + } + + @Test + void validateInput_BlankInput_ReturnsFalse() { + assertFalse(minimaxService.validateInput("")); + } +}