package com.vci.client.portal.test; import org.junit.Assert; import com.vci.client.portal.utility.UITools; import com.vci.common.utility.ObjectUtility; import com.vci.corba.common.VCIError; import com.vci.corba.portal.data.PLCommandParameter; public class TestPLCommandParameter { //test保存PLCommandParameter @org.junit.Test public void testSavePLCommandParameter(){ PLCommandParameter plCommandParameter = new PLCommandParameter(); plCommandParameter.plOId = ObjectUtility.getNewObjectID36(); plCommandParameter.plCommandOId = "plCommandOId1"; plCommandParameter.plKey = "plKey1"; plCommandParameter.plValue = "plValue1"; plCommandParameter.plCreateUser = "sam"; plCommandParameter.plModifyUser = "sam"; plCommandParameter.plLicensOrs = "plLicensOrs1"; try { boolean flag = UITools.getService().savePLCommandParameter(plCommandParameter); Assert.assertTrue(flag); } catch (VCIError e) { e.printStackTrace(); } } // test更新PLCommandParameter @org.junit.Test public void testUpdatePLCommandParameter() { PLCommandParameter plCommandParameter = new PLCommandParameter(); plCommandParameter.plOId = "73CD0C14-3945-E336-764E-54AAE7FF81AB"; plCommandParameter.plCommandOId = "update"; plCommandParameter.plKey = "plKey1"; plCommandParameter.plValue = "plValue1"; plCommandParameter.plCreateUser = "sam"; plCommandParameter.plModifyUser = "sam"; plCommandParameter.plLicensOrs = "plLicensOrs1"; try { boolean flag = UITools.getService().updatePLCommandParameter(plCommandParameter); Assert.assertTrue(flag); } catch (VCIError e) { e.printStackTrace(); } } // test删除PLCommandParameter @org.junit.Test public void testDeletePLCommandParameter() { PLCommandParameter plCommandParameter = new PLCommandParameter(); plCommandParameter.plOId = "E92A6BF7-615C-C2CE-1E79-B08BC8197AE0"; try { boolean flag = UITools.getService().deletePLCommandParameter(plCommandParameter); Assert.assertTrue(flag); } catch (VCIError e) { e.printStackTrace(); } } // test删除PLCommandParameter @org.junit.Test public void testDeletePLCommandParameterById() { try { boolean flag = UITools.getService().deletePLCommandParameterByID("82794B13-AD4F-B926-1F88-33746CB0C649"); Assert.assertTrue(flag); } catch (VCIError e) { e.printStackTrace(); } } @org.junit.Test public void testGetPLCommandParameterById(){ try { PLCommandParameter obj = UITools.getService().getPLCommandParameterById("0E43EDE6-4F16-01A8-F727-69A2B324FBC0"); System.out.println(); } catch (VCIError e) { // TODO Auto-generated catch block e.printStackTrace(); } } @org.junit.Test public void testGetPLCommandParameterByCommandOId(){ try { PLCommandParameter[] obj = UITools.getService().getPLCommandParametersByCommandOId("plCommandOId1"); System.out.println(); } catch (VCIError e) { // TODO Auto-generated catch block e.printStackTrace(); } } }