diff --git a/dsms-engine-application/src/test/java/com/dsms/common/constat/AlertSmsProviderEnumTest.java b/dsms-engine-application/src/test/java/com/dsms/common/constat/AlertSmsProviderEnumTest.java new file mode 100644 index 0000000000000000000000000000000000000000..85b2e3b21da263ad1b01ab47045e4e54afca7a39 --- /dev/null +++ b/dsms-engine-application/src/test/java/com/dsms/common/constat/AlertSmsProviderEnumTest.java @@ -0,0 +1,20 @@ +package com.dsms.common.constat; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +import com.dsms.common.constant.AlertSmsProviderEnum; +import org.junit.jupiter.api.Test; + +class AlertSmsProviderEnumTest { + + @Test + void testGetByCode() { + assertEquals(AlertSmsProviderEnum.ALIYUN, AlertSmsProviderEnum.getByCode("aliyun")); + } + + @Test + void testGetWrongCode() { + assertNull(AlertSmsProviderEnum.getByCode("test")); + } +}