LCF 공통 프레임워크 매핑 규칙 정의 #5
1 changed files with 24 additions and 0 deletions
24
src/test/java/com/example/lcf/LcfMappingRulesTest.java
Normal file
24
src/test/java/com/example/lcf/LcfMappingRulesTest.java
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package com.example.lcf;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class LcfMappingRulesTest {
|
||||
@Test
|
||||
void testLcfTry() {
|
||||
LcfMappingRules rules = new LcfMappingRules();
|
||||
Runnable action = mock(Runnable.class);
|
||||
doThrow(new RuntimeException("Test Exception")).when(action).run();
|
||||
|
||||
rules.lcfTry(action);
|
||||
// 예외가 발생했는지 확인하는 로직 추가
|
||||
}
|
||||
|
||||
@Test
|
||||
void testPerformDecimalOperation() {
|
||||
LcfMappingRules rules = new LcfMappingRules();
|
||||
double result = rules.performDecimalOperation(5.0, 3.0);
|
||||
assertEquals(8.0, result);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue