diff --git a/dsms-engine-application/src/test/java/com/dsms/modules/alert/service/impl/AlertAppriseServiceImplTest.java b/dsms-engine-application/src/test/java/com/dsms/modules/alert/service/impl/AlertAppriseServiceImplTest.java index 0ba432e3cb9dd0887b184560b620b1616f0cb245..00b4d3a5115622c84e05770ce36b3e9857d61f2c 100644 --- a/dsms-engine-application/src/test/java/com/dsms/modules/alert/service/impl/AlertAppriseServiceImplTest.java +++ b/dsms-engine-application/src/test/java/com/dsms/modules/alert/service/impl/AlertAppriseServiceImplTest.java @@ -45,7 +45,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) class AlertAppriseServiceImplTest { - private final static String smtpUsername = "smtpUsername"; + private String smtpUserName = "smtpUsername"; @Autowired private IAlertContactService mockAlertContactService; @MockBean @@ -77,7 +77,7 @@ class AlertAppriseServiceImplTest { // Verify the results assertThat(sendTestEmail).isTrue(); - verify(mockMailService).sendMail(new MailMessage(smtpUsername, ALERT_TEST_TITLE, ALERT_TEST_CONTENT, Collections.emptyList())); + verify(mockMailService).sendMail(new MailMessage(smtpUserName, ALERT_TEST_TITLE, ALERT_TEST_CONTENT, Collections.emptyList())); } @Test @@ -148,7 +148,7 @@ class AlertAppriseServiceImplTest { alertApprise.setType(type); alertApprise.setSmtpHost("smtpHost"); alertApprise.setSmtpPort(0); - alertApprise.setSmtpUsername(smtpUsername); + alertApprise.setSmtpUsername(smtpUserName); alertApprise.setSmtpPassword("smtpPassword"); alertApprise.setEmailFrom("emailFrom"); alertApprise.setSmsProvider(AlertSmsProviderEnum.ALIYUN.getCode());