package com.qs.mp.service; import com.qs.mp.MpApplication; import com.qs.mp.channel.domain.Channel; import com.qs.mp.channel.domain.vo.ChannelVO; import com.qs.mp.channel.service.IChannelService; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.TestPropertySource; @AutoConfigureMockMvc @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = MpApplication.class) @TestPropertySource(locations = "classpath:application-dev.yml") @ActiveProfiles("dev") public class ChannelServiceTest { @Autowired private IChannelService channelService; @Test public void testListChannel() { Channel channel = new Channel(); channel.setParentId(1L); List list = new ArrayList(); list = channelService.selectChannelVoList(channel,"channel"); System.out.println("result:"+list.toString()); } @Test public void testAddChannel() { Channel channel = new Channel(); } @Test public void testEditChannel() { Channel channel = new Channel(); } }