NoticeTest.java 2.2 KB
Newer Older
苗卫卫 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
package com.boco.nbd.wios.flow;

import com.boco.nbd.wios.BaseTest;
import com.boco.nbd.wios.flow.entity.bo.AppointmentUserBO;
import com.boco.nbd.wios.flow.entity.bo.BusinessRefusedBO;
import com.boco.nbd.wios.flow.entity.bo.TimeConfirmBO;
import com.boco.nbd.wios.flow.entity.bo.TimeNotifyBO;
import com.boco.nbd.wios.flow.service.INoticeService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * @ClassName NoticeTest
 * @Description 短信通知单元测试
 * @Author songyanfei
 * @Email songyanfei@boco.com.cn
 * @Date 2022/10/28 15:18
 * @Version V1.0
 */
public class NoticeTest extends BaseTest {

    @Autowired
    INoticeService noticeService;

    /**
     * 测试预约用户短信模板
     */
    @Test
    public void testAppointmentUserNotice() {
        AppointmentUserBO appointmentUser = new AppointmentUserBO("2022-10-31 12:57:46", "张三", "18399998888");
        String phone = "17647396448";
        org.junit.Assert.assertTrue(noticeService.appointmentUser(appointmentUser, phone));
    }

    /**
     * 测试服务商拒单通知模板
     */
    @Test
    public void testBusinessRefusedNotice() {
        BusinessRefusedBO businessRefused = new BusinessRefusedBO();
        businessRefused.setWorkId("435138124832458");
        String phone = "17647396448";
        org.junit.Assert.assertTrue(noticeService.businessRefused(businessRefused, phone));
    }

    /**
     * 测试安装预约时间变更确认模板
     */
    @Test
    public void testAppointmentTimeConfirmNotice() {
        TimeConfirmBO timeConfirm = new TimeConfirmBO();
        timeConfirm.setBeforeTime("2022-10-31 12:57:46");
        timeConfirm.setAfterTime("2022-10-31 17:57:46");
        String phone = "17647396448";
        org.junit.Assert.assertTrue(noticeService.appointmentTimeConfirm(timeConfirm, phone));
    }

    /**
     * 测试安装预约时间变更通知模板
     */
    @Test
    public void testAppointmentTimeNotifyNotice() {
        TimeNotifyBO timeNotify = new TimeNotifyBO("2022-10-31 12:57:46", "34918545356484");
        String phone = "17647396448";
        org.junit.Assert.assertTrue(noticeService.appointmentTimeNotify(timeNotify, phone));
    }

}