test: 补充后端单元测试与覆盖率配置
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.guo.learningprogresstracker.exception;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* AppException 构造与消息测试。
|
||||
*/
|
||||
class AppExceptionTest {
|
||||
|
||||
@Test
|
||||
void constructor_shouldKeepMessage() {
|
||||
AppException ex = new AppException("数据库连接失败");
|
||||
|
||||
assertEquals("数据库连接失败", ex.getMessage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user