분석 결과를 기반으로 Spring 전환 체크리스트 작성 #4
1 changed files with 47 additions and 0 deletions
|
|
@ -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(""));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue