This commit is contained in:
Rinjae
2025-09-05 19:06:22 +09:00
commit a1d74cf004
333 changed files with 47708 additions and 0 deletions
@@ -0,0 +1,42 @@
package com.eactive.eai.custom.stderrorcode;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.jdbc.Sql;
import com.eactive.eai.common.lifecycle.LifecycleException;
import com.eactive.eai.data.OnlineJPATestConfiguration;
import com.eactive.eai.data.jpa.BaseRepositoryImpl;
@DataJpaTest
@ContextConfiguration(classes = { OnlineJPATestConfiguration.class })
@ComponentScan({ "com.eactive.eai.custom.stderrorcode" })
@EnableJpaRepositories(repositoryBaseClass = BaseRepositoryImpl.class, basePackages = {
"com.eactive.eai.custom.stderrorcode" })
@EntityScan({ "com.eactive.eai.data.entity.custom.stderrorcode" })
@Sql({ "/com/eactive/eai/custom/stderrorcode/init_tseaimx06.sql" })
class ChannelErrorCodeManagerTest {
@Autowired
ChannelErrorCodeManager channelErrorCodeManager;
@Test
void testStart() throws LifecycleException {
// given
// when
channelErrorCodeManager.start();
// then
assertTrue(channelErrorCodeManager.getChannelErrorCode("BCIO00000_ITR") != null);
assertTrue(channelErrorCodeManager.getChannelErrorCode("BCIO00009_MOB") == null);
}
}
@@ -0,0 +1,42 @@
package com.eactive.eai.custom.stderrorcode;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.jdbc.Sql;
import com.eactive.eai.common.lifecycle.LifecycleException;
import com.eactive.eai.data.OnlineJPATestConfiguration;
import com.eactive.eai.data.jpa.BaseRepositoryImpl;
@DataJpaTest
@ContextConfiguration(classes = { OnlineJPATestConfiguration.class })
@ComponentScan({ "com.eactive.eai.custom.stderrorcode" })
@EnableJpaRepositories(repositoryBaseClass = BaseRepositoryImpl.class, basePackages = {
"com.eactive.eai.custom.stderrorcode" })
@EntityScan({ "com.eactive.eai.data.entity.custom.stderrorcode" })
@Sql({ "/com/eactive/eai/custom/stderrorcode/init_tseaimx03.sql" })
class StdErrorCodeManagerTest {
@Autowired
StdErrorCodeManager stdErrorCodeManager;
@Test
void testStart() throws LifecycleException {
// given
// when
stdErrorCodeManager.start();
// then
assertTrue(stdErrorCodeManager.getSTDErrorCode("BCIO00000") != null);
assertTrue(stdErrorCodeManager.getSTDErrorCode("BCIO00009") == null);
}
}
@@ -0,0 +1,24 @@
package com.eactive.eai.data;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import com.eactive.eai.common.util.ApplicationContextProvider;
import com.eactive.eai.data.jpa.BaseRepositoryImpl;
@Configuration
@ComponentScan({ "com.eactive.eai.data.property" })
@EnableJpaRepositories(repositoryBaseClass = BaseRepositoryImpl.class, basePackages = {
"com.eactive.eai.data.property" })
@EntityScan({ "com.eactive.eai.data.entity.onl.property" })
public class OnlineJPATestConfiguration {
@Bean
ApplicationContextProvider applicationContextProvider() {
return new ApplicationContextProvider();
}
}
@@ -0,0 +1,2 @@
INSERT INTO tseaimx03 (obj_id, std_err_cd_yn, err_cd, stsy_err_cd, err_tlg_lan_dscd, msg_dit, err_tp_cd, err_cd_us_yn, ipt_msg_cd_yn, isd_err_cas_cts, osd_err_cas_cts, err_cd_apl_dt, actn_cd, of_actn_cd, chng_dttm, del_yn, mod_dttm) VALUES('1', 'Y', 'BCIO00000', 'BCIO00000', 'KOR', '', 'B', 'Y', 'N', '정상처리되었습니다.', '정상처리되었습니다.(고객메시지)', '2024-01-02', NULL, NULL, '2024-01-02 00:00:00.000', 'N', '2024-01-02 00:00:00.000');
INSERT INTO tseaimx03 (obj_id, std_err_cd_yn, err_cd, stsy_err_cd, err_tlg_lan_dscd, msg_dit, err_tp_cd, err_cd_us_yn, ipt_msg_cd_yn, isd_err_cas_cts, osd_err_cas_cts, err_cd_apl_dt, actn_cd, of_actn_cd, chng_dttm, del_yn, mod_dttm) VALUES('2', 'Y', 'BCIO00001', 'BCIO00000', 'KOR', '', 'B', 'Y', 'N', '정상처리되었습니다.', '정상처리되었습니다.(고객메시지)', '2024-01-02', NULL, NULL, '2024-01-02 00:00:00.000', 'N', '2024-01-02 00:00:00.000');
@@ -0,0 +1,5 @@
INSERT INTO tseaimx06 (obj_id, std_err_cd, err_tlg_lan_dscd, err_tp_cd, chnl_tp_cd, err_cd_us_yn, chnl_err_cd, chnl_dtls_clcd, chnl_err_msg_cts, err_cd_apl_dt, chnl_id, actn_cd, of_actn_cd, chng_dttm, del_yn, mod_dttm) VALUES('1', 'BCIO00000', 'KOR', 'B', NULL, 'Y', 'CH00000', 'ITR', '성공하였습니다.(단말)', '2024-01-02', NULL, NULL, NULL, '2024-01-02 00:00:00.000', 'N', '2024-01-02 00:00:00.000');
INSERT INTO tseaimx06 (obj_id, std_err_cd, err_tlg_lan_dscd, err_tp_cd, chnl_tp_cd, err_cd_us_yn, chnl_err_cd, chnl_dtls_clcd, chnl_err_msg_cts, err_cd_apl_dt, chnl_id, actn_cd, of_actn_cd, chng_dttm, del_yn, mod_dttm) VALUES('2', 'BCIO00000', 'KOR', 'B', NULL, 'Y', 'CH00000', 'MOB', '성공하였습니다.(모바일)', '2024-01-02', NULL, NULL, NULL, '2024-01-02 00:00:00.000', 'N', '2024-01-02 00:00:00.000');
INSERT INTO tseaimx06 (obj_id, std_err_cd, err_tlg_lan_dscd, err_tp_cd, chnl_tp_cd, err_cd_us_yn, chnl_err_cd, chnl_dtls_clcd, chnl_err_msg_cts, err_cd_apl_dt, chnl_id, actn_cd, of_actn_cd, chng_dttm, del_yn, mod_dttm) VALUES('3', 'BCIO00000', 'KOR', 'B', NULL, 'Y', 'CH00000', 'CCI', '성공하였습니다.(상담AP)', '2024-01-02', NULL, NULL, NULL, '2024-01-02 00:00:00.000', 'N', '2024-01-02 00:00:00.000');
INSERT INTO tseaimx06 (obj_id, std_err_cd, err_tlg_lan_dscd, err_tp_cd, chnl_tp_cd, err_cd_us_yn, chnl_err_cd, chnl_dtls_clcd, chnl_err_msg_cts, err_cd_apl_dt, chnl_id, actn_cd, of_actn_cd, chng_dttm, del_yn, mod_dttm) VALUES('4', 'BCIO00000', 'KOR', 'B', NULL, 'Y', 'CH00000', 'IVR', '성공하였습니다.(ARS)', '2024-01-02', NULL, NULL, NULL, '2024-01-02 00:00:00.000', 'N', '2024-01-02 00:00:00.000');
INSERT INTO tseaimx06 (obj_id, std_err_cd, err_tlg_lan_dscd, err_tp_cd, chnl_tp_cd, err_cd_us_yn, chnl_err_cd, chnl_dtls_clcd, chnl_err_msg_cts, err_cd_apl_dt, chnl_id, actn_cd, of_actn_cd, chng_dttm, del_yn, mod_dttm) VALUES('5', 'BCIO00009', 'KOR', 'B', NULL, 'Y', 'CH00000', 'ITR', '성공하였습니다.(단말)', '2024-01-02', NULL, NULL, NULL, '2024-01-02 00:00:00.000', 'N', '2024-01-02 00:00:00.000');