test
This commit is contained in:
parent
6c13ac2535
commit
062582cbc1
|
|
@ -1,13 +1,21 @@
|
||||||
package com.nflg.product.bomnew.service.test;
|
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.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.service.MaterialService;
|
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.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
|
|
@ -17,13 +25,17 @@ public class MaterialServiceTest {
|
||||||
MaterialService materialService;
|
MaterialService materialService;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void addMaterial() {
|
public void addMaterialPublish() {
|
||||||
try {
|
try {
|
||||||
String data = materialService.addMaterial("1111", "afafafa", "1234");
|
String data = materialService.addMaterialPublish("33323", "物料名称1(发货)", "201101");
|
||||||
System.out.println(data);
|
System.out.println(data);
|
||||||
|
// ResultVO<String> r = JSON.parseObject(data, new TypeReference<ResultVO<String>>(){});
|
||||||
|
|
||||||
|
System.out.println(data);
|
||||||
} catch (NflgBusinessException e) {
|
} catch (NflgBusinessException e) {
|
||||||
e.getMessage();
|
e.getMessage();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue