package com.izouma.dingdong.service;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class ChatServiceTest {
    @Autowired
    private ChatService chatService;

    @Test
    public void test() {
        long startTime = System.currentTimeMillis(); //获取开始时间
        System.out.println(chatService.my(82L));
        long endTime = System.currentTimeMillis(); //获取结束时间
        System.out.println("程序运行时间：" + (endTime - startTime) + "ms"); //输出程序运行时间

    }

    @Test
    public void testShow() {
        long startTime = System.currentTimeMillis(); //获取开始时间
        System.out.println(chatService.showChat(82L, 2105L));
        long endTime = System.currentTimeMillis(); //获取结束时间
        System.out.println("程序运行时间：" + (endTime - startTime) + "ms"); //输出程序运行时间
    }

    @Test
    public void testDel() {
        chatService.delChat(174L);
    }

}
