Your ROOT_URL in app.ini is https://bdgit.educoder.net/ but you are visiting http://bdgit.educoder.net/pasky49wx/MiNote/src/branch/main/test/ExampleUnitTest.java You should set ROOT_URL correctly, otherwise the web may not work correctly.
MiNote/test/ExampleUnitTest.java

25 lines
706 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package net.micode.notes;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* 示例本地单元测试类
* 功能演示JUnit框架在Android项目中的基本用法
* 运行环境开发主机非Android设备
* 测试范围不依赖Android系统API的纯Java逻辑
*/
public class ExampleUnitTest {
/**
* 加法运算测试方法
* 测试目标验证2 + 2的结果是否等于4
* 断言类型assertEquals预期值实际值
*/
@Test
public void addition_isCorrect() {
// 验证整数加法运算的正确性
// 若2 + 2不等于4测试将失败并抛出AssertionError
assertEquals(4, 2 + 2);
}
}