package com.izouma.dingdong.contorller;

import com.izouma.dingdong.domain.backstage.Voice;
import com.izouma.dingdong.repo.backstage.VoiceRepo;
import com.izouma.dingdong.web.backstage.VoiceController;
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;

@RunWith(SpringRunner.class)
@SpringBootTest
public class VoiceControllerTest {
    @Autowired
    private VoiceController voiceController;

    @Autowired
    private VoiceRepo voiceRepo;

   @Test
    public void test(){
        Voice build = Voice.builder()
                .url("https://idingdong.oss-cn-hangzhou.aliyuncs.com/audio/2020-05-28-13-53-28DJxEOyUA.mp3")
                .build();
        build.setId(667L);
        System.out.println(voiceController.save(build));
    }

/*    @Test
    public void testMy(){
        System.out.println(voiceRepo.findAllByUserId(656L));
    }*/
}
