|
@@ -18,6 +18,7 @@ import org.junit.runner.RunWith;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -47,14 +48,17 @@ public class TblDicItemServiceTest {
|
|
|
private TblDicItemMapper tblDicItemMapper;
|
|
|
|
|
|
@Test
|
|
|
+ @Transactional
|
|
|
public void add() {
|
|
|
|
|
|
TblDicItem tblDicItem = new TblDicItem();
|
|
|
- tblDicItem.setDicType("test");
|
|
|
- tblDicItem.setItemCode("test");
|
|
|
- tblDicItem.setItemName("test");
|
|
|
+ tblDicItem.setDicType("test3");
|
|
|
+ tblDicItem.setItemCode("test4");
|
|
|
+ tblDicItem.setItemName("test5");
|
|
|
boolean save = tblDicItemService.save(tblDicItem);
|
|
|
+
|
|
|
System.out.println(JSON.toJSONString(save, JSONWriter.Feature.PrettyFormat));
|
|
|
+ System.out.println(JSON.toJSONString(tblDicItem, JSONWriter.Feature.PrettyFormat));
|
|
|
}
|
|
|
|
|
|
@Test
|