use of com.bc.pmpheep.back.po.MaterialOrg in project pmph by BCSquad.
the class MaterialOrgServiceTest method testAddMaterialOrgs.
@Test
@Rollback(Const.ISROLLBACK)
public void testAddMaterialOrgs() {
MaterialOrg materialOrg1 = new MaterialOrg(1L, 1L);
MaterialOrg materialOrg2 = new MaterialOrg(1L, 2L);
MaterialOrg materialOrg3 = new MaterialOrg(2L, 1L);
MaterialOrg materialOrg4 = new MaterialOrg(2L, 2L);
List<MaterialOrg> materialOrgs = new ArrayList<>();
materialOrgs.add(materialOrg2);
materialOrgs.add(materialOrg3);
materialOrgs.add(materialOrg4);
Assert.assertTrue("addMaterialOrg 添加失败", materialOrgService.addMaterialOrg(materialOrg1).getId() > 0);
Assert.assertTrue("addMaterialOrg 添加失败", materialOrgService.addMaterialOrg(materialOrg3).getId() > 0);
// 批量新增
Assert.assertTrue("addMaterialOrgs添加失败", materialOrgService.addMaterialOrgs(materialOrgs) > 0);
}
Aggregations