package com.eactive.ext.kjb.ums.test;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;


@Slf4j
public class KjbEmailSendModuleTests {

    @Test
    public void test() {
//        KjbProperty prop = new KjbProperty();
//        prop.setEaiBatchUrl(null);
//        prop.setEaiBatchSendDir("D:\\kjb-logs\\sendmail\\snd");
//        prop.setEaiBatchBackupDir("D:\\kjb-logs\\sendmail\\bak");
//        prop.setEaiBatchInterfaceId("UAGFF00001UIE");
//
//        EmailSendModule service = EmailSendModule.getInstance(prop, null);
//        MessageRequest messageRequest = new MessageRequest();
//        messageRequest.setId(UUID.randomUUID().toString());
//        messageRequest.setEmail("dearmai@dearmai.net");
//        messageRequest.setUsername("김광은");
//        messageRequest.setSubject("제목 - test");
//
//        messageRequest.setMessageCode(MessageCode.USER_ACCOUNT_LOCKED);
////        messageRequest.setMessage("내용 - test");
//
//
//        CompletableFuture<Boolean> future = service.sendEmail(messageRequest, (result, ex) -> {
//            if (ex != null) {
//                log.error("failed", ex);
//            } else {
//                log.info("result: {}", result);
//            }
//        });
//
//        future.join();

        log.info("done");
    }
}
