2026-08-28 代码优化更新

This commit is contained in:
Hello-hao
2026-08-28 19:46:39 +08:00
parent 16d992daee
commit 624330a7c4
@@ -1,5 +1,6 @@
package cn.hellohao.Tbed;
import cn.hellohao.utils.SpringContextHolder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -8,6 +9,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@RunWith(SpringRunner.class)
@@ -20,6 +22,7 @@ public class TbedApplicationTests {
@Test
public void contextLoads() {
assertNotNull(applicationContext);
assertSame(applicationContext, SpringContextHolder.getApplicationContext());
assertTrue(applicationContext.containsBean("tbedApplication"));
}