GoodsProviderServiceTest.java
1.07 KB
package com.bs.order;
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()));
}
}