package com.vci.client.portal.test; import org.junit.Test; import com.vci.client.portal.utility.UITools; import com.vci.corba.common.VCIError; import com.vci.corba.portal.data.Constraint; import com.vci.corba.portal.data.PLAction; public class TestPLAction { //test保存PLAction // @org.junit.Test // public void testSavePLAction(){ // PLAction plAction = new PLAction(); // plAction.plOId = ObjectUtility.getNewObjectID36(); // plAction.plCode = "plCode1"; // plAction.plName = "plName1"; // plAction.plBSUrl = "plBSUrl1"; // plAction.plCSClass = "plCSClass1"; // plAction.plDesc = "plDesc1"; // plAction.plCreateUser = "sam"; // plAction.plModifyUser = "sam"; // plAction.plTypeType = "business1"; // plAction.plLicensOrs = "plLicensOrs1"; // try { // boolean flag = Tool.getService().savePLAction(plAction); // Assert.assertTrue(flag); // } catch (PLMError e) { // e.printStackTrace(); // } // } // test更新PLAction // @org.junit.Test // public void testUpdatePLAction() { // PLAction plAction = new PLAction(); // plAction.plOId = "237F4354-7A92-478D-C57D-3A80448E35FC"; // plAction.plCode = "plCode222"; // plAction.plName = "plName22"; // plAction.plBSUrl = "plBSUrl1"; // plAction.plCSClass = "plCSClass1"; // plAction.plDesc = "plDesc1"; // plAction.plCreateUser = "sam"; // plAction.plModifyUser = "sam"; // plAction.plTypeType = "business1"; // plAction.plLicensOrs = "plLicensOrs1"; // try { // boolean flag = Tool.getService().updatePLAction(plAction); // Assert.assertTrue(flag); // } catch (PLMError e) { // e.printStackTrace(); // } // } // test删除PLAction // @org.junit.Test // public void testDeletePLAction() { // PLAction plAction = new PLAction(); // plAction.plOId = "237F4354-7A92-478D-C57D-3A80448E35FC"; // plAction.plCode = "plCode222"; // plAction.plName = "plName22"; // plAction.plBSUrl = "plBSUrl1"; // plAction.plCSClass = "plCSClass1"; // plAction.plDesc = "plDesc1"; // plAction.plCreateUser = "sam"; // plAction.plModifyUser = "sam"; // plAction.plTypeType = "business1"; // plAction.plLicensOrs = "plLicensOrs1"; // try { // boolean flag = Tool.getService().deletePLAction(plAction); // Assert.assertTrue(flag); // } catch (PLMError e) { // e.printStackTrace(); // } // } // test删除PLAction // @org.junit.Test // public void testDeletePLActionById() { // try { // boolean flag = Tool.getService().deletePLActionByID("842BFCA9-E0DB-54F1-86F0-4E39EB0135F8"); // Assert.assertTrue(flag); // } catch (PLMError e) { // e.printStackTrace(); // } // } // @Test // public void testGetPLActionById() throws PLMError{ // PLAction obj = Tool.getService().getPLActionById("21FFD30A-EF7F-17ED-9B5E-FBC78979481D"); // System.out.println(); // } // // @Test // public void testGetAllPLAction() throws PLMError{ // PLAction[] obj = Tool.getService().getAllPLAction(); // System.out.println(); // } @Test public void testGetPLActionsByConsArray() throws VCIError{ Constraint[] consArray = new Constraint[2]; Constraint cons1 = new Constraint(); cons1.key = "PLOID"; cons1.value = "oid"; Constraint cons2 = new Constraint(); cons2.key = "PLCODE"; cons2.value = "c"; consArray[0] = cons1; consArray[1] = cons2; PLAction[] obj = UITools.getService().getPLActionsByConsArray(consArray); System.out.println(); } }