package com.izouma.dingdong.contorller;

import com.izouma.dingdong.domain.Chat;
import com.izouma.dingdong.web.ChatController;
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 ChatControllerTest {
    @Autowired
    private ChatController chatController;


    @Test
    public void testChat() {
        Chat chat = Chat.builder()
                .sendUserId(82L)
                .receiveUserId(174L)
                .content("qqqqqqqqqqqq！！")
                .build();
        chatController.save(chat);
    }

    @Test
    public void testShow() {
        System.out.println(chatController.showChat(82L, 185L));
    }

}
