diff --git a/ktg-admin/src/test/WmStorageLocationUnitTest.java b/ktg-admin/src/test/WmStorageLocationUnitTest.java index 767efc9..9f13d83 100644 --- a/ktg-admin/src/test/WmStorageLocationUnitTest.java +++ b/ktg-admin/src/test/WmStorageLocationUnitTest.java @@ -10,6 +10,9 @@ import org.springframework.test.context.junit4.SpringRunner; import java.util.List; +/** + * 库区管理 + */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class WmStorageLocationUnitTest { diff --git a/ktg-admin/src/test/WmWarehouseUnitTest.java b/ktg-admin/src/test/WmWarehouseUnitTest.java index b0c8588..3a0dbe5 100644 --- a/ktg-admin/src/test/WmWarehouseUnitTest.java +++ b/ktg-admin/src/test/WmWarehouseUnitTest.java @@ -10,6 +10,9 @@ import org.springframework.test.context.junit4.SpringRunner; import java.util.List; +/** + * 库房管理 + */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class WmWarehouseUnitTest { diff --git a/ktg-admin/src/test/WmsBusinessTypeUnitTest.java b/ktg-admin/src/test/WmsBusinessTypeUnitTest.java new file mode 100644 index 0000000..24690a3 --- /dev/null +++ b/ktg-admin/src/test/WmsBusinessTypeUnitTest.java @@ -0,0 +1,62 @@ +import com.alibaba.fastjson.JSON; +import com.ktg.RuoYiApplication; +import com.ktg.mes.md.domain.WmsBusinessType; +import com.ktg.mes.md.service.IWmsBusinessTypeService; +import org.junit.Test; +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 java.util.List; + +/** + * 出入库类型 + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +public class WmsBusinessTypeUnitTest { + @Autowired + private IWmsBusinessTypeService wmsBusinessTypeService; + + @Test + public void add() { + WmsBusinessType wmsBusinessType = new WmsBusinessType(); + wmsBusinessType.setCode("TYPE_UNIT_TEST_01"); + wmsBusinessType.setName("出库单元测试数据01"); + wmsBusinessType.setFlag("2"); + wmsBusinessType.setRemark("出库单元测试数据01"); + wmsBusinessTypeService.insertWmsBusinessType(wmsBusinessType); + System.out.println("add:" + wmsBusinessType.getTypeId()); // 14 + } + + @Test + public void list() { + List list = wmsBusinessTypeService.selectWmsBusinessTypeList(new WmsBusinessType()); + System.out.println("list:" + JSON.toJSONString(list)); + } + + @Test + public void getInfo() { + System.out.println("getInfo:" + JSON.toJSONString(wmsBusinessTypeService.selectWmsBusinessTypeByTypeId("14"))); + } + + @Test + public void edit() { + WmsBusinessType wmsBusinessType = new WmsBusinessType(); + wmsBusinessType.setTypeId("14"); + wmsBusinessType.setCode("TYPE_UNIT_TEST_02"); + wmsBusinessType.setName("出库单元测试数据02"); + wmsBusinessType.setFlag("2"); + wmsBusinessType.setRemark("出库单元测试数据02"); + int count = wmsBusinessTypeService.updateWmsBusinessType(wmsBusinessType); + System.out.println("edit:" + count); + } + + @Test + public void remove() { + String[] ids = {"14"}; + int count = wmsBusinessTypeService.deleteWmsBusinessTypeByTypeIds(ids); + System.out.println("remove:" + count); + } +}