This commit is contained in:
jing's 2023-12-08 20:06:36 +08:00
parent 6c13ac2535
commit 062582cbc1
1 changed files with 14 additions and 2 deletions

View File

@ -1,13 +1,21 @@
package com.nflg.product.bomnew.service.test;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.google.common.base.Objects;
import com.nflg.product.base.core.exception.NflgBusinessException;
import com.nflg.product.bomnew.service.MaterialService;
import nflg.product.common.constant.STATE;
import nflg.product.common.vo.ResultVO;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.io.IOException;
@RunWith(SpringRunner.class)
@SpringBootTest
@ -17,13 +25,17 @@ public class MaterialServiceTest {
MaterialService materialService;
@Test
public void addMaterial() {
public void addMaterialPublish() {
try {
String data = materialService.addMaterial("1111", "afafafa", "1234");
String data = materialService.addMaterialPublish("33323", "物料名称1(发货)", "201101");
System.out.println(data);
// ResultVO<String> r = JSON.parseObject(data, new TypeReference<ResultVO<String>>(){});
System.out.println(data);
} catch (NflgBusinessException e) {
e.getMessage();
} catch (IOException e) {
e.getMessage();
}
}