test(birthday-sms): 更新生日短信发送测试用例

- 注释掉@SpringBootTest注解以避免完整应用启动
- 注释掉@Test注解以防止测试自动运行
- 修改测试专家姓名为"唐威"- 注释掉设置专家电话号码的代码
- 更新短信模板内容为完整的生日祝福语- 保留测试方法的基本结构和调用逻辑
master
李一帆 2025-09-26 10:55:08 +08:00
parent 9de2852075
commit adecc084dd
1 changed files with 5 additions and 4 deletions

View File

@ -17,20 +17,21 @@ import java.util.List;
* @author lyf
* @since 2025-09-25
*/
@SpringBootTest(classes = com.whdc.FxkhTxlApiApplication.class)
//@SpringBootTest(classes = com.whdc.FxkhTxlApiApplication.class)
@ActiveProfiles("dev")
public class BirthdaySmsServiceTest {
@Autowired
private SmsHelper smsHelper;
@Test
// @Test
public void testSendBirthdaySms() {
System.out.println("=== 开始测试生日短信发送功能 ===");
// 创建测试专家数据
Specialist specialist = new Specialist();
specialist.setName("李");
specialist.setName("唐威");
// specialist.setPhone("18154318312");
specialist.setPhone("15671545233");
specialist.setStatus(1);
@ -43,7 +44,7 @@ public class BirthdaySmsServiceTest {
try {
// 直接使用你提供的模板内容测试发送逻辑
String template = "{姓名},测试短信接口";
String template = "尊敬的{姓名}专家,岁月如歌又一载,今朝生辰贺君来,今天是您的生日,湖北省水利厅向您致以最真挚的生日祝福!感谢您为湖北防汛抗旱事业保驾护航,您的每一份建议都凝聚着智慧,每一次指导都给予我们力量。在这个特别的日子里,愿您被时光温柔以待,事业如朗月,生活胜春烟,所遇皆美好,所得皆所愿!";
System.out.println("使用模板:" + template);
// 调用内部方法进行测试