GoodsProviderServiceTest.java
1.31 KB
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
package com.bs.order;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bs.order.entity.GoodsProvider;
import com.bs.order.service.GoodsProviderService;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
@Slf4j
@SpringBootTest
@ActiveProfiles("local")
public class GoodsProviderServiceTest {
@Autowired
private GoodsProviderService goodsProviderService;
@Test
public void testInsert() {
log.info("result:{}",goodsProviderService.insert(GoodsProvider.builder()
.updatedBy("zhoulm").providerName("供应商名称").address("北京八达岭长城")
.build()));
}
@Test
public void testUpdate() {
log.info("result:{}",goodsProviderService.update(GoodsProvider.builder()
.id(1)
.updatedBy("zhoulm").providerName("供应商名称1").contactName("张三").contactPhone("15818888888")
.build()));
}
@Test
public void testListWithPage() {
log.info("result:{}",goodsProviderService.listWithPage(Page.of(2L,10L,true),
GoodsProvider.builder().build()));
}
}