feat: add native ota progress feedback

This commit is contained in:
kris
2026-03-27 15:39:19 +08:00
parent ae571a76ff
commit 6559ad5bce
3 changed files with 376 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
package com.hyzq.boss;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class OtaDownloadStateMapperTest {
@Test
public void toProgressLabel_formatsKnownProgress() {
assertEquals("已下载 50%", OtaDownloadStateMapper.toProgressLabel(50, true));
}
@Test
public void toProgressLabel_handlesUnknownProgress() {
assertEquals("正在准备下载", OtaDownloadStateMapper.toProgressLabel(0, false));
}
}